I guess I solved my own problem when I tinkered with the code a bit.
// Turns off fullscreen mode
void core::turnFullscreenOff() {
if (_fullscreen) {
_fullscreen = false;
// Turn off fullscreen
dbRestoreWindow();
dbSetWindowLayout(1, 0, 1); // Set 2nd parameter to 0
}
}
For some reason, if change the second parameter of "dbSetWindowLayout()" to '0', I don't have this issue.
Anyways, I think though I may have found a possible bug:
First off, I was using the resolution of 1024x576 (16:9 ratio), well, when I would toggle fullscreen on then off, I'd get the blurry canvas (if dbSetWindowLayout() 2nd's parameter was '1') when I was back in windowed mode.
Well, I used the dbScreenWidth() and dbScreenHeight() functions to tell me what the resolution was 1024x576. Both in fullscreen and windowed mode.
Well, this looks a little suspicious since the windowed mode is now blurry. I did a screen cap of before I turned on fullscreen, the canvas was 1024x576, then I took another after I toggled fullscreen on then off, the screen cap showed I had a resolution of
1022x574. Oddly enough, dbScreenWidth() and dbScreenHeight() reported
1024x576.
Something seems off here.
Well, in the code if I tried to use dbSetDisplayMode() or dbSetWindowSize() (after toggling on then off fullscreen mode), and punched in
'1024' and
'576', I would still have the blurry canvas (and the actual resolution would be
1022x574).
So I think that if the second parameter in dbSetWindowLayout() gets set to '1' can mess up some things.
So should I report this bug?
http://ref.darkgdk.us/ <- Online DarkGDK Refernece. More content coming soon.