Ignore setDisplayMode when the Display parent is set. Fix #98
This commit is contained in:
parent
1dbca8b623
commit
a5c4462a3e
|
@ -239,7 +239,8 @@ public final class Display {
|
|||
throw new NullPointerException("mode must be non-null");
|
||||
boolean was_fullscreen = isFullscreen();
|
||||
current_mode = mode;
|
||||
if ( isCreated() ) {
|
||||
if ( !isCreated() || parent != null )
|
||||
return;
|
||||
destroyWindow();
|
||||
// If mode is not fullscreen capable, make sure we are in windowed mode
|
||||
try {
|
||||
|
@ -256,7 +257,6 @@ public final class Display {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static DisplayMode getEffectiveMode() {
|
||||
return !isFullscreen() && parent != null ? new DisplayMode(parent.getWidth(), parent.getHeight()) : current_mode;
|
||||
|
|
Loading…
Reference in New Issue