mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2025-12-06 08:01:59 +01:00
Ignore setDisplayMode when the Display parent is set. Fix #98
This commit is contained in:
parent
1dbca8b623
commit
a5c4462a3e
|
|
@ -239,21 +239,21 @@ public final class Display {
|
||||||
throw new NullPointerException("mode must be non-null");
|
throw new NullPointerException("mode must be non-null");
|
||||||
boolean was_fullscreen = isFullscreen();
|
boolean was_fullscreen = isFullscreen();
|
||||||
current_mode = mode;
|
current_mode = mode;
|
||||||
if ( isCreated() ) {
|
if ( !isCreated() || parent != null )
|
||||||
destroyWindow();
|
return;
|
||||||
// If mode is not fullscreen capable, make sure we are in windowed mode
|
destroyWindow();
|
||||||
try {
|
// If mode is not fullscreen capable, make sure we are in windowed mode
|
||||||
if ( was_fullscreen && !isFullscreen() )
|
try {
|
||||||
display_impl.resetDisplayMode();
|
if ( was_fullscreen && !isFullscreen() )
|
||||||
else if ( isFullscreen() )
|
|
||||||
switchDisplayMode();
|
|
||||||
createWindow();
|
|
||||||
makeCurrentAndSetSwapInterval();
|
|
||||||
} catch (LWJGLException e) {
|
|
||||||
drawable.destroy();
|
|
||||||
display_impl.resetDisplayMode();
|
display_impl.resetDisplayMode();
|
||||||
throw e;
|
else if ( isFullscreen() )
|
||||||
}
|
switchDisplayMode();
|
||||||
|
createWindow();
|
||||||
|
makeCurrentAndSetSwapInterval();
|
||||||
|
} catch (LWJGLException e) {
|
||||||
|
drawable.destroy();
|
||||||
|
display_impl.resetDisplayMode();
|
||||||
|
throw e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue