From 67193f52dcde9ee33d9e7433c144d813598d3688 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C5=A0imek?= Date: Tue, 2 Jul 2019 20:55:05 +0200 Subject: [PATCH] Fixed launching the game without resolution arguments --- desktop/src/com/riiablo/DesktopLauncher.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/desktop/src/com/riiablo/DesktopLauncher.java b/desktop/src/com/riiablo/DesktopLauncher.java index bfe2f287..9013fa6e 100644 --- a/desktop/src/com/riiablo/DesktopLauncher.java +++ b/desktop/src/com/riiablo/DesktopLauncher.java @@ -75,16 +75,12 @@ public class DesktopLauncher { config.addIcon("ic_launcher_32.png", Files.FileType.Internal); config.addIcon("ic_launcher_16.png", Files.FileType.Internal); config.resizable = false; - //config.width = 1280;//853; - //config.height = 720;//480; - //config.width = Diablo.VIRTUAL_WIDTH; - //config.height = Diablo.VIRTUAL_HEIGHT; config.allowSoftwareMode = cmd != null && cmd.hasOption("allowSoftwareMode"); - int width = NumberUtils.toInt(cmd.getOptionValue('i')); - int height = NumberUtils.toInt(cmd.getOptionValue('o')); - config.width = width;//853; - config.height = height;//480; + int width = NumberUtils.toInt(cmd.getOptionValue('i', "853")); + int height = NumberUtils.toInt(cmd.getOptionValue('o', "480")); + config.width = width; + config.height = height; final Client client = new Client(home, height); if (cmd != null) { client.setWindowedForced(cmd.hasOption("w"));