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:
Elias Naur 2007-08-16 08:55:06 +00:00
parent 03749c312c
commit 15cf41553c
1 changed files with 1 additions and 2 deletions

View File

@ -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);
}