I'm porting SH to 0.95 but I can't get the ingame mode switching to work flawlessly.
1) Switching between displaymodes retrieved from Display.getAvailableDisplayModes() results in windowed mode results in first a mode switch to 640x480 then back to desktop resolution. Then there seems to be 2 windows. A black undecorated window. Behind it a decorated with my game partially showing.
2) Staring in fullscreen and setting a displaymode created with the DisplayMode constructor do of course not work. But I get native crash wich is a bit unplesant. Fair enough.
3) Starting in fullscreen and later calling Display.setFullscreen(false) I get the following native crash:
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x0
Function=[Unknown.]
Library=(N/A)
NOTE: We are unable to locate the function name symbol for the error
just occurred. Please refer to release documentation for possible
reason and solutions.
Current Java thread:
at org.lwjgl.opengl.Win32Display.makeCurrent(Native Method)
at org.lwjgl.opengl.Display.makeCurrent(Display.java:491)
at org.lwjgl.opengl.Display.createWindow(Display.java:219)
at org.lwjgl.opengl.Display.setFullscreen(Display.java:369)
at sh.SquareHeads.createWindow(SquareHeads.java:231)
at sh.menu.BMainMenu.actionPerformed(BMainMenu.java:882)
at trb.bgui.BImageButton.fireActionEvent(BImageButton.java:176)
at trb.bgui.BImageButton.onMouseEvent(BImageButton.java:119)
at trb.bgui.BScreen.doMouseEvent(BScreen.java:157)
at trb.bgui.BScreen.handleMouse(BScreen.java:109)
at sh.menu.BMainMenu.runMenu(BMainMenu.java:301)
at sh.SquareHeads.runMenu(SquareHeads.java:403)
at sh.SquareHeads.main(SquareHeads.java:1462)
4) Starting in fullscreen and later switching to displaymode I got using Display.getDisplayMode() before Display was created the first time, I also get the same native crash as above.
At this point I gave up staring in fullscreen mode and trying to switch to windowed mode

5) There is 2 mode switches when I need to switch between windowed/fullscreen and also change resolution. As both setFullscreen and setDisplayMode will change mode. This is a bit unpleasant on my monitor as it makes 2 loud sounds each time a mode is changed. Any chance of having a setDisplayMode(DisplayMode newMode, boolean fullscreen) that does it with only one mode change?
So I'm having great problems switching modes in game. Is this something you are willing to fix. How are you dealing with it?