Skip to content
This repository has been archived by the owner on Jan 24, 2022. It is now read-only.

Commit

Permalink
Add a config option to disable the UI - temporary fix
Browse files Browse the repository at this point in the history
  • Loading branch information
comp500 committed Feb 11, 2020
1 parent 16eca48 commit 52ac24f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/main/java/link/infra/jumploader/ConfigFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ public class ConfigFile {
public boolean forceFallbackStorage = false;
// Don't update configuration if the side to be downloaded is not the same as the current side
public boolean overrideInferredSide = false;
// Disable the user interface - temporary fix for crashes on Linux!
public boolean disableUI = false;
public LaunchOptions launch = new LaunchOptions();
public JarOptions jars = new JarOptions();
public AutoconfOptions autoconfig = new AutoconfOptions();
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/link/infra/jumploader/Jumploader.java
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ private List<URL> resolveJars(ConfigFile config, ParsedArguments argsParsed) {
lwjglAvailable = true;
} catch (ClassNotFoundException ignored) {}

if (!lwjglAvailable || GraphicsEnvironment.isHeadless() || argsParsed.nogui) {
if (!lwjglAvailable || GraphicsEnvironment.isHeadless() || argsParsed.nogui || config.disableUI) {
while (!workerManager.isDone()) {
LOGGER.info("Progress: " + (workerManager.getWorkerProgress() * 100) + "%");
URL resolvedURL;
Expand Down

0 comments on commit 52ac24f

Please sign in to comment.