Don't reset the mode to the initial mode when a mode switch or window creation goes wrong
This commit is contained in:
parent
9f7b3756e3
commit
c51c3897b1
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue