Run with wine if Pterodactyl, and run with proton if not.
This commit is contained in:
parent
e6736842e9
commit
df83511e45
1 changed files with 12 additions and 7 deletions
|
@ -55,13 +55,18 @@ Future<void> runDetachedProton(
|
|||
List<String> args = ["run", command];
|
||||
args.addAll(argx);
|
||||
|
||||
StateMachine.PROC = await Process.start(
|
||||
"xvfb-run",
|
||||
["--auto-servernum", settings.getProtonExecutablePath()] +
|
||||
args, // Run arbitrary command with arguments
|
||||
environment: env,
|
||||
workingDirectory: workingDir,
|
||||
mode: ProcessStartMode.normal);
|
||||
if (settings.inst!.pterodactylMode)
|
||||
StateMachine.PROC = await Process.start("wine", args,
|
||||
environment: env,
|
||||
workingDirectory: workingDir,
|
||||
mode: ProcessStartMode.normal);
|
||||
else
|
||||
StateMachine.PROC = await Process.start(
|
||||
settings.getProtonExecutablePath(),
|
||||
args, // Run arbitrary command with arguments
|
||||
environment: env,
|
||||
workingDirectory: workingDir,
|
||||
mode: ProcessStartMode.normal);
|
||||
|
||||
StateMachine.monitorProcess();
|
||||
} catch (e) {
|
||||
|
|
Loading…
Reference in a new issue