Hi!
I’m making a side-scrolling shooter, and I’ve successfully implemented resolution change and windowed/fullscreen-mode changing. Only problem is, very rarely the screen goes black when I change to windowed mode. I end up with a black fullscreen window, I have my custom cursor and if I Alt-Tab I can see from the little preview Windows 7 gives me at the taskbar, that the menu is being shown in my game, but when I enter it again it is still black, with the cursor. Then I click where I think the “Apply” button is, and it changes to the correct windowed resolution WITH my menus being shown.
It’s really weird, and I think it might have something to do with my brute-force way of changing the displaymode. Could someone tell me what might be causing this?
The if-statements are there, because I use these functions to set the screen windowed/full-screen depending on settings loaded from a configuration-file when the game starts. So the if-statements are skipped when the game starts, but if the settings are changed within the options-menu, it’ll transfer the current input-handlers and cursor from the window to the full-screen frame and vice versa.
I have separate methods for changing resolutions for windowed mode and full-screen mode respectively, when the windowed-mode flag has not been changed in the options menu, and those work just fine.