mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 10:18:01 +00:00
- Somewhat cleaner implementation related to the previous commit.
This commit is contained in:
@@ -48,12 +48,8 @@ public class Main {
|
|||||||
boolean fullscreenFlag = false;
|
boolean fullscreenFlag = false;
|
||||||
if (FileUtil.doesFileExist(desktopModeAssetsDir + "screen_resolution.ini")) {
|
if (FileUtil.doesFileExist(desktopModeAssetsDir + "screen_resolution.ini")) {
|
||||||
String[] res = FileUtil.readFileToString(desktopModeAssetsDir + "screen_resolution.ini").split("x");
|
String[] res = FileUtil.readFileToString(desktopModeAssetsDir + "screen_resolution.ini").split("x");
|
||||||
if (res.length == 3) {
|
fullscreenFlag = res.length == 3 ? Integer.parseInt(res[2].trim()) > 0 : true;
|
||||||
fullscreenFlag = Integer.parseInt(res[2].trim()) > 0;
|
if (res.length >= 2) {
|
||||||
desktopScreenWidth = Integer.parseInt(res[0].trim());
|
|
||||||
desktopScreenHeight = Integer.parseInt(res[1].trim());
|
|
||||||
} else if (res.length == 2) {
|
|
||||||
fullscreenFlag = true;
|
|
||||||
desktopScreenWidth = Integer.parseInt(res[0].trim());
|
desktopScreenWidth = Integer.parseInt(res[0].trim());
|
||||||
desktopScreenHeight = Integer.parseInt(res[1].trim());
|
desktopScreenHeight = Integer.parseInt(res[1].trim());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user