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();
|
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue