1
0
mirror of https://github.com/SKCraft/Launcher.git synced 2025-01-20 21:21:19 +01:00

Fix misspelled field in launcher configuration

This commit is contained in:
Henry Le Grys 2021-01-30 01:46:22 +00:00
parent 52c02edba0
commit 27da4e8e4c
3 changed files with 11 additions and 5 deletions

View File

@ -28,7 +28,7 @@ public class Configuration {
private int maxMemory = 0; // Updated in Launcher
private int permGen = 256;
private int windowWidth = 854;
private int widowHeight = 480;
private int windowHeight = 480;
private boolean proxyEnabled = false;
private String proxyHost = "localhost";
private int proxyPort = 8080;
@ -49,4 +49,10 @@ public class Configuration {
return super.hashCode();
}
/**
* Backwards compatibility for old configs with the misspelling.
*/
public void setWidowHeight(int height) {
this.windowHeight = height;
}
}

View File

@ -8,8 +8,8 @@ package com.skcraft.launcher.dialog;
import com.skcraft.launcher.Configuration;
import com.skcraft.launcher.Launcher;
import com.skcraft.launcher.swing.*;
import com.skcraft.launcher.persistence.Persistence;
import com.skcraft.launcher.swing.*;
import com.skcraft.launcher.util.SharedLocale;
import lombok.NonNull;
@ -76,7 +76,7 @@ public class ConfigurationDialog extends JDialog {
mapper.map(maxMemorySpinner, "maxMemory");
mapper.map(permGenSpinner, "permGen");
mapper.map(widthSpinner, "windowWidth");
mapper.map(heightSpinner, "widowHeight");
mapper.map(heightSpinner, "windowHeight");
mapper.map(useProxyCheck, "proxyEnabled");
mapper.map(proxyHostText, "proxyHost");
mapper.map(proxyPortText, "proxyPort");

View File

@ -358,7 +358,7 @@ public class Runner implements Callable<Process>, ProgressObservable {
args.add("--width");
args.add(String.valueOf(config.getWindowWidth()));
args.add("--height");
args.add(String.valueOf(config.getWidowHeight()));
args.add(String.valueOf(config.getWindowHeight()));
}
// Add old platform hacks that the new manifests already specify
@ -400,7 +400,7 @@ public class Runner implements Callable<Process>, ProgressObservable {
map.put("assets_index_name", versionManifest.getAssetId());
map.put("resolution_width", String.valueOf(config.getWindowWidth()));
map.put("resolution_height", String.valueOf(config.getWidowHeight()));
map.put("resolution_height", String.valueOf(config.getWindowHeight()));
map.put("launcher_name", launcher.getTitle());
map.put("launcher_version", launcher.getVersion());