mirror of
https://ghfast.top/https://github.com/StarCitizenToolBox/app.git
synced 2025-08-16 00:16:18 +08:00
update Cpu Affinity
This commit is contained in:
@@ -134,8 +134,7 @@ class HomeUIModel extends BaseUIModel {
|
||||
return;
|
||||
}
|
||||
scInstallPaths = await SCLoggerHelper.getGameInstallPath(listData,
|
||||
withVersion: ["LIVE", "PTU", "EPTU", "TECH-PREVIEW"],
|
||||
checkExists: true);
|
||||
withVersion: ["LIVE", "PTU", "EPTU"], checkExists: true);
|
||||
if (scInstallPaths.isNotEmpty) {
|
||||
scInstalledPath = scInstallPaths.first;
|
||||
}
|
||||
|
@@ -49,7 +49,7 @@ class LoginDialog extends BaseUI<LoginDialogModel> {
|
||||
color: Colors.white.withOpacity(.6),
|
||||
),
|
||||
)
|
||||
] else if (model.loginStatus == 2) ...[
|
||||
] else if (model.loginStatus == 2 || model.loginStatus == 3) ...[
|
||||
Center(
|
||||
child: Column(
|
||||
children: [
|
||||
@@ -76,7 +76,9 @@ class LoginDialog extends BaseUI<LoginDialogModel> {
|
||||
fontSize: 24, fontWeight: FontWeight.bold),
|
||||
),
|
||||
const SizedBox(height: 32),
|
||||
const Text("正在为您启动游戏..."),
|
||||
Text(model.loginStatus == 2
|
||||
? "正在为您启动游戏..."
|
||||
: "正在等待优化CPU参数..."),
|
||||
const SizedBox(height: 12),
|
||||
const ProgressRing(),
|
||||
],
|
||||
|
@@ -7,6 +7,7 @@ import 'package:hive/hive.dart';
|
||||
import 'package:jwt_decode/jwt_decode.dart';
|
||||
import 'package:local_auth/local_auth.dart';
|
||||
import 'package:starcitizen_doctor/base/ui_model.dart';
|
||||
import 'package:starcitizen_doctor/common/helper/system_helper.dart';
|
||||
import 'package:starcitizen_doctor/common/win32/credentials.dart';
|
||||
import 'package:starcitizen_doctor/ui/home/home_ui_model.dart';
|
||||
import 'package:starcitizen_doctor/ui/home/webview/webview.dart';
|
||||
@@ -217,12 +218,21 @@ class LoginDialogModel extends BaseUIModel {
|
||||
await launchFile.writeAsString(json.encode(launchData));
|
||||
notifyListeners();
|
||||
await Future.delayed(const Duration(seconds: 1));
|
||||
|
||||
await Future.delayed(const Duration(seconds: 3));
|
||||
final confBox = await Hive.openBox("app_conf");
|
||||
final inputGameLaunchECore = int.tryParse(
|
||||
confBox.get("gameLaunch_eCore_count", defaultValue: "0")) ??
|
||||
0;
|
||||
final processorAffinity =
|
||||
await SystemHelper.getCpuAffinity(inputGameLaunchECore);
|
||||
|
||||
// TODO 更新启动方式
|
||||
|
||||
homeUIModel.doLaunchGame(
|
||||
'$installPath\\$executable',
|
||||
["-no_login_dialog", ...launchOptions.toString().split(" ")],
|
||||
installPath);
|
||||
await Future.delayed(const Duration(seconds: 3));
|
||||
Navigator.pop(context!);
|
||||
}
|
||||
|
||||
String getChannelID() {
|
||||
@@ -232,8 +242,6 @@ class LoginDialogModel extends BaseUIModel {
|
||||
return "PTU";
|
||||
} else if (installPath.endsWith("\\EPTU")) {
|
||||
return "EPTU";
|
||||
} else if (installPath.endsWith("\\TECH-PREVIEW")) {
|
||||
return "TECH-PREVIEW";
|
||||
}
|
||||
return "LIVE";
|
||||
}
|
||||
|
Reference in New Issue
Block a user