能效核心屏蔽功能应用到 RSI启动器,以让开发板使用此功能。

This commit is contained in:
2023-11-28 20:04:15 +08:00
parent 06c581cd80
commit 4f6623a4cd
8 changed files with 45 additions and 33 deletions

View File

@ -537,7 +537,7 @@ class HomeUIModel extends BaseUIModel {
dPrint('stdout: ${result.stdout}');
dPrint('stderr: ${result.stderr}');
} else {
dPrint("set Affinity === $processorAffinity ");
dPrint("set Affinity === $processorAffinity launchExe === $launchExe");
ProcessResult result = await Process.run("cmd.exe", [
'/C',
'Start',

View File

@ -220,14 +220,9 @@ class LoginDialogModel extends BaseUIModel {
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);
await SystemHelper.getCpuAffinity();
// TODO 更新启动方式
homeUIModel.doLaunchGame(
'$installPath\\$executable',
["-no_login_dialog", ...launchOptions.toString().split(" ")],

View File

@ -17,14 +17,14 @@ class SettingUI extends BaseUI<SettingUIModel> {
subTitle:
"启用:${model.isEnableAutoLogin ? "已启用" : "已禁用"} 设备支持:${model.isDeviceSupportWinHello ? "支持" : "不支持"} 邮箱:${model.autoLoginEmail} 密码:${model.isEnableAutoLoginPwd ? "已加密保存" : "未保存"}",
onTap: model.onResetAutoLogin),
const SizedBox(height: 12),
makeSettingsItem(const Icon(FontAwesomeIcons.microchip),
"启动游戏时忽略能效核心( 适用于Intel 12th+ 处理器 [实验性功能,请随时反馈]",
subTitle:
"已设置的核心数量:${model.inputGameLaunchECore} 设置需要忽略的处理器的能效心数量盒子将在使用启动游戏功能时为您修改游戏所运行的CPU参数当为 0 时不启用此功能 ",
onTap: model.setGameLaunchECore),
const SizedBox(height: 12),
],
const SizedBox(height: 12),
makeSettingsItem(const Icon(FontAwesomeIcons.microchip),
"启动游戏时忽略能效核心( 适用于Intel 12th+ 处理器 [实验性功能,请随时反馈]",
subTitle:
"已设置的核心数量:${model.inputGameLaunchECore} (此功能适用于首页的盒子一键启动 或 工具中的RSI启动器管理员模式当为 0 时不启用此功能 ",
onTap: model.setGameLaunchECore),
const SizedBox(height: 12),
makeSettingsItem(
const Icon(FluentIcons.folder_open), "设置启动器文件RSI Launcher.exe",
subTitle: model.customLauncherPath != null

View File

@ -56,7 +56,8 @@ class SettingUIModel extends BaseUIModel {
userBox.get("gameLaunch_eCore_count", defaultValue: "0");
final input = await showInputDialogs(context!,
title: "请输入要忽略的 CPU 核心数",
content: "tip您的设备拥有几个能效核心就输入几非大小核设备请保持0",
content:
"Tip您的设备拥有几个能效核心就输入几非大小核设备请保持 0\n\n此功能适用于首页的盒子一键启动 或 工具中的 RSI启动器管理员模式当为 0 时不启用此功能。",
initialValue: defaultInput,
inputFormatters: [FilteringTextInputFormatter.digitsOnly]);
if (input == null) return;

View File

@ -68,7 +68,7 @@ class ToolsUIModel extends BaseUIModel {
_ToolsItemData(
"rsilauncher_admin_mode",
"RSI Launcher 管理员模式",
"在某些情况下 RSI启动器 无法正确获得管理员权限,您可尝试使用该功能以管理员模式运行启动器",
"以管理员身份运行RSI启动器可能会解决一些问题。\n\n若设置了能效核心屏蔽参数,也会在此应用",
const Icon(FluentIcons.admin, size: 28),
onTap: _adminRSILauncher,
)