Should fix 'Never get to here'

This commit is contained in:
huangyuhui
2018-06-08 13:55:38 +08:00
parent e9070a77c3
commit 110b7cb06f
3 changed files with 10 additions and 10 deletions

View File

@@ -109,7 +109,13 @@ public final class LauncherHelper {
.then(Task.of(Schedulers.javafx(), () -> emitStatus(LoadingState.LAUNCHING)))
.then(Task.of(variables -> {
variables.set("launcher", new HMCLGameLauncher(
repository, selectedVersion, variables.get("account"), setting.toLaunchOptions(profile.getGameDir()), new HMCLProcessListener(variables.get("account"), setting, gameVersion.isPresent())
repository,
selectedVersion,
variables.get("account"),
setting.toLaunchOptions(profile.getGameDir()),
setting.getLauncherVisibility() == LauncherVisibility.CLOSE
? null // Unnecessary to start listening to game process output when close launcher immediately after game launched.
: new HMCLProcessListener(variables.get("account"), setting, gameVersion.isPresent())
));
}))
.then(variables -> {

View File

@@ -115,7 +115,8 @@ public final class Controllers {
}
public static void dialog(Region content) {
decorator.showDialog(content);
if (decorator != null)
decorator.showDialog(content);
}
public static void dialog(String text) {