option to allow larger resolutions, close #11

This commit is contained in:
yugecin 2016-10-11 11:40:16 +02:00
parent 35695ccf97
commit 0e43e6f938
2 changed files with 3 additions and 1 deletions

View File

@ -309,6 +309,7 @@ public class Options {
return resolutionIdx + ""; return resolutionIdx + "";
} }
}, },
ALLOW_LARGER_RESOLUTIONS ("Allow large resolutions", "AllowLargeRes", "Allow resolutions larger than the native resolution", false),
FULLSCREEN ("Fullscreen Mode", "Fullscreen", "Restart to apply changes.", false), FULLSCREEN ("Fullscreen Mode", "Fullscreen", "Restart to apply changes.", false),
SKIN ("Skin", "Skin", "Restart (Ctrl+Shift+F5) to apply skin changes.") { SKIN ("Skin", "Skin", "Restart (Ctrl+Shift+F5) to apply skin changes.") {
@Override @Override
@ -1435,7 +1436,7 @@ public class Options {
height = Integer.parseInt(res[1]); height = Integer.parseInt(res[1]);
// check for larger-than-screen dimensions // check for larger-than-screen dimensions
if (screenWidth < width || screenHeight < height) { if (!GameOption.ALLOW_LARGER_RESOLUTIONS.getBooleanValue() && (screenWidth < width || screenHeight < height)) {
width = 800; width = 800;
height = 600; height = 600;
} }

View File

@ -57,6 +57,7 @@ public class OptionsMenu extends BasicGameState {
DISPLAY ("Display", new GameOption[] { DISPLAY ("Display", new GameOption[] {
GameOption.SCREEN_RESOLUTION, GameOption.SCREEN_RESOLUTION,
GameOption.FULLSCREEN, GameOption.FULLSCREEN,
GameOption.ALLOW_LARGER_RESOLUTIONS,
GameOption.SKIN, GameOption.SKIN,
GameOption.TARGET_FPS, GameOption.TARGET_FPS,
GameOption.SHOW_FPS, GameOption.SHOW_FPS,