fix: try to fix blocking game running when launcher visibility was set to close after game started.

This commit is contained in:
huanghongxun committed 2020-09-04 00:38:38 +08:00
1 parent 674dfca34d
commit f4f1850271
1 file changed
+3
@@ -323,6 +323,9 @@ public class DefaultLauncher extends Launcher {
Process process;
try {
ProcessBuilder builder = new ProcessBuilder(rawCommandLine).directory(runDirectory);
if (listener == null) {
builder.inheritIO();
}
String appdata = options.getGameDir().getAbsoluteFile().getParent();
if (appdata != null) builder.environment().put("APPDATA", appdata);
process = builder.start();