mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-04 14:07:52 +00:00
Linux: Avoid unneccessary mode switching in LinuxDisplay.resetDisplayMode (patch by buggs)
This commit is contained in:
parent
acbd39a6c1
commit
8896ec3631
1 changed files with 3 additions and 2 deletions
|
|
@ -548,7 +548,8 @@ final class LinuxDisplay implements DisplayImplementation {
|
|||
public void resetDisplayMode() {
|
||||
lockAWT();
|
||||
try {
|
||||
switchDisplayMode(saved_mode);
|
||||
if(current_mode != saved_mode)
|
||||
switchDisplayMode(saved_mode);
|
||||
if (isXF86VidModeSupported())
|
||||
doSetGamma(saved_gamma);
|
||||
} catch (LWJGLException e) {
|
||||
|
|
@ -645,7 +646,7 @@ final class LinuxDisplay implements DisplayImplementation {
|
|||
current_mode = saved_mode;
|
||||
saved_gamma = getCurrentGammaRamp();
|
||||
current_gamma = saved_gamma;
|
||||
return saved_mode;
|
||||
return current_mode;
|
||||
} finally {
|
||||
unlockAWT();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue