Merge pull request #57 from JanSimek/fix-desktop-launch

Fixed launching the game without resolution arguments
This commit is contained in:
Collin Smith 2019-07-03 12:52:57 -07:00 committed by GitHub
commit ffdd9e75c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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"));