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