mirror of
https://mirror.ghproxy.com/https://github.com/StarCitizenToolBox/app.git
synced 2025-02-06 03:54:29 +08:00
游戏非正常退出时,增加弹窗提示
This commit is contained in:
parent
71880a6041
commit
a442823bfe
@ -570,14 +570,12 @@ class HomeUIModel extends BaseUIModel {
|
||||
_isGameRunning[installPath] = true;
|
||||
notifyListeners();
|
||||
try {
|
||||
late ProcessResult result;
|
||||
if (processorAffinity == null) {
|
||||
ProcessResult result = await Process.run(launchExe, args);
|
||||
dPrint('Exit code: ${result.exitCode}');
|
||||
dPrint('stdout: ${result.stdout}');
|
||||
dPrint('stderr: ${result.stderr}');
|
||||
result = await Process.run(launchExe, args);
|
||||
} else {
|
||||
dPrint("set Affinity === $processorAffinity launchExe === $launchExe");
|
||||
ProcessResult result = await Process.run("cmd.exe", [
|
||||
result = await Process.run("cmd.exe", [
|
||||
'/C',
|
||||
'Start',
|
||||
'"StarCitizen"',
|
||||
@ -587,9 +585,13 @@ class HomeUIModel extends BaseUIModel {
|
||||
launchExe,
|
||||
...args
|
||||
]);
|
||||
}
|
||||
dPrint('Exit code: ${result.exitCode}');
|
||||
dPrint('stdout: ${result.stdout}');
|
||||
dPrint('stderr: ${result.stderr}');
|
||||
if (result.exitCode != 0) {
|
||||
showToast(context!,
|
||||
"游戏非正常退出\nexitCode=${result.exitCode}\nstdout=${result.stdout}\nstderr=${result.stderr}");
|
||||
}
|
||||
|
||||
final launchFile = File("$installPath\\loginData.json");
|
||||
|
Loading…
x
Reference in New Issue
Block a user