Linux: Avoid unneccessary mode switching in LinuxDisplay.resetDisplayMode (patch by buggs)
This commit is contained in:
parent
acbd39a6c1
commit
8896ec3631
|
@ -548,6 +548,7 @@ final class LinuxDisplay implements DisplayImplementation {
|
|||
public void resetDisplayMode() {
|
||||
lockAWT();
|
||||
try {
|
||||
if(current_mode != saved_mode)
|
||||
switchDisplayMode(saved_mode);
|
||||
if (isXF86VidModeSupported())
|
||||
doSetGamma(saved_gamma);
|
||||
|
@ -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…
Reference in New Issue