Don't allow switching to fullscreen when a custom display mode is in effect. This is a change from before, where the current mode was simply overwritten with the initial (desktop) mode
This commit is contained in:
parent
03749c312c
commit
15cf41553c
|
@ -297,8 +297,7 @@ public final class Display {
|
|||
|
||||
private static void switchDisplayMode() throws LWJGLException {
|
||||
if (!current_mode.isFullscreen()) {
|
||||
LWJGLUtil.log("Switching to "+initial_mode);
|
||||
setDisplayMode(initial_mode);
|
||||
throw new IllegalStateException("Only modes acquired from getAvailableDisplayModes() can be used for fullscreen display");
|
||||
}
|
||||
display_impl.switchDisplayMode(current_mode);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue