Don't reset the mode to the initial mode when a mode switch or window creation goes wrong

This commit is contained in:
Elias Naur 2004-11-01 23:13:30 +00:00
parent 9f7b3756e3
commit c51c3897b1
1 changed files with 5 additions and 7 deletions

View File

@ -166,7 +166,7 @@ public final class Display {
createWindow();
} catch (LWJGLException e) {
destroyContext();
reset();
resetDisplayMode();
throw e;
}
}
@ -376,7 +376,7 @@ public final class Display {
createWindow();
} catch (LWJGLException e) {
destroyContext();
reset();
resetDisplayMode();
throw e;
}
}
@ -565,7 +565,7 @@ public final class Display {
throw e;
}
} catch (LWJGLException e) {
reset();
resetDisplayMode();
throw e;
}
}
@ -657,10 +657,8 @@ public final class Display {
* in the static constructor
*/
private static void reset() {
if (!current_mode.equals(initial_mode)) {
resetDisplayMode();
current_mode = initial_mode;
}
resetDisplayMode();
current_mode = initial_mode;
}
/**