better way to check if display settings changed
This commit is contained in:
@@ -134,8 +134,6 @@ public class Options {
|
||||
/** Port binding. */
|
||||
private static int port = 49250;
|
||||
|
||||
public static boolean wasResolutionChanged;
|
||||
|
||||
/**
|
||||
* Returns whether the XDG flag in the manifest (if any) is set to "true".
|
||||
* @return true if XDG directories are enabled, false otherwise
|
||||
@@ -311,20 +309,8 @@ public class Options {
|
||||
return resolutionIdx + "";
|
||||
}
|
||||
},
|
||||
ALLOW_LARGER_RESOLUTIONS ("Allow large resolutions", "AllowLargeRes", "Allow resolutions larger than the native resolution", false) {
|
||||
@Override
|
||||
public void click(GameContainer container) {
|
||||
super.click(container);
|
||||
wasResolutionChanged = true;
|
||||
}
|
||||
},
|
||||
FULLSCREEN ("Fullscreen Mode", "Fullscreen", "Restart to apply changes.", false) {
|
||||
@Override
|
||||
public void click(GameContainer container) {
|
||||
super.click(container);
|
||||
wasResolutionChanged = true;
|
||||
}
|
||||
},
|
||||
ALLOW_LARGER_RESOLUTIONS ("Allow large resolutions", "AllowLargeRes", "Allow resolutions larger than the native resolution", false),
|
||||
FULLSCREEN ("Fullscreen Mode", "Fullscreen", "Restart to apply changes.", false),
|
||||
SKIN ("Skin", "Skin", "Restart (Ctrl+Shift+F5) to apply skin changes.") {
|
||||
@Override
|
||||
public String getValueString() { return skinName; }
|
||||
@@ -1360,6 +1346,10 @@ public class Options {
|
||||
return resolutionIdx;
|
||||
}
|
||||
|
||||
public static boolean allowLargeResolutions() {
|
||||
return GameOption.ALLOW_LARGER_RESOLUTIONS.getBooleanValue();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the target frame rate.
|
||||
* @return the target FPS
|
||||
|
||||
Reference in New Issue
Block a user