feat: Add OpenXR setting, track default values, and optimize config file writing by skipping default entries.

This commit is contained in:
xkeyC 2025-12-12 10:06:21 +08:00
parent 3fd020b8b0
commit 138be64c0d
11 changed files with 417 additions and 337 deletions

View File

@ -17,6 +17,7 @@ class GamePerformanceData {
this.min, this.min,
this.value, this.value,
this.group, this.group,
this.defaultValue,
}); });
GamePerformanceData.fromJson(dynamic json) { GamePerformanceData.fromJson(dynamic json) {
@ -28,6 +29,8 @@ class GamePerformanceData {
min = json['min']; min = json['min'];
value = json['value']; value = json['value'];
group = json['group']; group = json['group'];
// Store the initial value as default value
defaultValue = json['value'];
} }
String? key; String? key;
String? name; String? name;
@ -37,6 +40,7 @@ class GamePerformanceData {
num? min; num? min;
num? value; num? value;
String? group; String? group;
num? defaultValue;
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final map = <String, dynamic>{}; final map = <String, dynamic>{};

View File

@ -1697,6 +1697,12 @@ class MessageLookup extends MessageLookupByLibrary {
MessageLookupByLibrary.simpleMessage( MessageLookupByLibrary.simpleMessage(
"Model object detail, affects LOD, etc.", "Model object detail, affects LOD, etc.",
), ),
"performance_json_text_openxr": MessageLookupByLibrary.simpleMessage(
"Enable OpenXR",
),
"performance_json_text_openxr_info": MessageLookupByLibrary.simpleMessage(
"Connect OpenXR-compatible headsets, use Numpad / to switch between VR and widescreen theater mode after game launch",
),
"performance_json_text_particles": MessageLookupByLibrary.simpleMessage( "performance_json_text_particles": MessageLookupByLibrary.simpleMessage(
"Particle Detail", "Particle Detail",
), ),

View File

@ -1410,12 +1410,18 @@ class MessageLookup extends MessageLookupByLibrary {
"动态模糊", "动态模糊",
), ),
"performance_json_text_motion_blur_info": "performance_json_text_motion_blur_info":
MessageLookupByLibrary.simpleMessage("开启以提高运动感关闭提升观感"), MessageLookupByLibrary.simpleMessage("开启以提高运动感,关闭提升观感"),
"performance_json_text_object_detail": MessageLookupByLibrary.simpleMessage( "performance_json_text_object_detail": MessageLookupByLibrary.simpleMessage(
"对象细节", "对象细节",
), ),
"performance_json_text_object_detail_info": "performance_json_text_object_detail_info":
MessageLookupByLibrary.simpleMessage("模型对象细节影响LOD等.."), MessageLookupByLibrary.simpleMessage("模型对象细节影响LOD等.."),
"performance_json_text_openxr": MessageLookupByLibrary.simpleMessage(
"启用 OpenXR",
),
"performance_json_text_openxr_info": MessageLookupByLibrary.simpleMessage(
"连接与 OpenXR 兼容的头显,启动游戏后,使用数字小键盘 / 切换 VR 与 宽屏剧院模式",
),
"performance_json_text_particles": MessageLookupByLibrary.simpleMessage( "performance_json_text_particles": MessageLookupByLibrary.simpleMessage(
"粒子细节", "粒子细节",
), ),

View File

@ -4576,6 +4576,26 @@ class S {
); );
} }
/// `Enable OpenXR`
String get performance_json_text_openxr {
return Intl.message(
'Enable OpenXR',
name: 'performance_json_text_openxr',
desc: '',
args: [],
);
}
/// `Connect OpenXR-compatible headsets, use Numpad / to switch between VR and widescreen theater mode after game launch`
String get performance_json_text_openxr_info {
return Intl.message(
'Connect OpenXR-compatible headsets, use Numpad / to switch between VR and widescreen theater mode after game launch',
name: 'performance_json_text_openxr_info',
desc: '',
args: [],
);
}
/// `Set FOV` /// `Set FOV`
String get performance_json_text_fov { String get performance_json_text_fov {
return Intl.message( return Intl.message(

View File

@ -907,6 +907,10 @@
"@performance_json_text_motion_blur": {}, "@performance_json_text_motion_blur": {},
"performance_json_text_motion_blur_info": "Enable for enhanced motion feel, disable for improved visuals", "performance_json_text_motion_blur_info": "Enable for enhanced motion feel, disable for improved visuals",
"@performance_json_text_motion_blur_info": {}, "@performance_json_text_motion_blur_info": {},
"performance_json_text_openxr": "Enable OpenXR",
"@performance_json_text_openxr": {},
"performance_json_text_openxr_info": "Connect OpenXR-compatible headsets, use Numpad / to switch between VR and widescreen theater mode after game launch",
"@performance_json_text_openxr_info": {},
"performance_json_text_fov": "Set FOV", "performance_json_text_fov": "Set FOV",
"@performance_json_text_fov": {}, "@performance_json_text_fov": {},
"performance_json_text_ui_animation": "UI Fade Animation", "performance_json_text_ui_animation": "UI Fade Animation",

View File

@ -907,6 +907,10 @@
"@performance_json_text_motion_blur": {}, "@performance_json_text_motion_blur": {},
"performance_json_text_motion_blur_info": "動きの感覚を高めるためにオン、視覚的体験を向上させるためにオフ", "performance_json_text_motion_blur_info": "動きの感覚を高めるためにオン、視覚的体験を向上させるためにオフ",
"@performance_json_text_motion_blur_info": {}, "@performance_json_text_motion_blur_info": {},
"performance_json_text_openxr": "OpenXRを有効にする",
"@performance_json_text_openxr": {},
"performance_json_text_openxr_info": "OpenXR対応ヘッドセットを接続し、ゲーム起動後にテンキーの / でVRとワイドスクリーンシアターモードを切り替え",
"@performance_json_text_openxr_info": {},
"performance_json_text_fov": "視野角FOVを設定", "performance_json_text_fov": "視野角FOVを設定",
"@performance_json_text_fov": {}, "@performance_json_text_fov": {},
"performance_json_text_ui_animation": "UIフェードインアウトアニメーション", "performance_json_text_ui_animation": "UIフェードインアウトアニメーション",

View File

@ -907,6 +907,10 @@
"@performance_json_text_motion_blur": {}, "@performance_json_text_motion_blur": {},
"performance_json_text_motion_blur_info": "Включите для усиления чувства движения, выключите для улучшения восприятия", "performance_json_text_motion_blur_info": "Включите для усиления чувства движения, выключите для улучшения восприятия",
"@performance_json_text_motion_blur_info": {}, "@performance_json_text_motion_blur_info": {},
"performance_json_text_openxr": "Включить OpenXR",
"@performance_json_text_openxr": {},
"performance_json_text_openxr_info": "Подключите OpenXR-совместимый шлем, используйте / на цифровой клавиатуре после запуска игры для переключения между VR и широкоэкранным режимом",
"@performance_json_text_openxr_info": {},
"performance_json_text_fov": "Настройка FOV", "performance_json_text_fov": "Настройка FOV",
"@performance_json_text_fov": {}, "@performance_json_text_fov": {},
"performance_json_text_ui_animation": "Анимация затухания UI", "performance_json_text_ui_animation": "Анимация затухания UI",

View File

@ -776,7 +776,9 @@
"performance_json_text_vsync": "垂直同步", "performance_json_text_vsync": "垂直同步",
"performance_json_text_vsync_info": "开启以防止撕裂,关闭以提高帧率", "performance_json_text_vsync_info": "开启以防止撕裂,关闭以提高帧率",
"performance_json_text_motion_blur": "动态模糊", "performance_json_text_motion_blur": "动态模糊",
"performance_json_text_motion_blur_info": "开启以提高运动感,关闭提升观感", "performance_json_text_motion_blur_info": "开启以提高运动感,关闭提升观感",
"performance_json_text_openxr": "启用 OpenXR",
"performance_json_text_openxr_info": "连接与 OpenXR 兼容的头显,启动游戏后,使用数字小键盘 / 切换 VR 与 宽屏剧院模式",
"performance_json_text_fov": "设置视角FOV", "performance_json_text_fov": "设置视角FOV",
"performance_json_text_ui_animation": "UI 淡入淡出动画", "performance_json_text_ui_animation": "UI 淡入淡出动画",
"performance_json_text_custom_parameters": "自定义参数", "performance_json_text_custom_parameters": "自定义参数",

View File

@ -901,6 +901,10 @@
"@performance_json_text_motion_blur": {}, "@performance_json_text_motion_blur": {},
"performance_json_text_motion_blur_info": "開啟以提高運動感,關閉提升觀感", "performance_json_text_motion_blur_info": "開啟以提高運動感,關閉提升觀感",
"@performance_json_text_motion_blur_info": {}, "@performance_json_text_motion_blur_info": {},
"performance_json_text_openxr": "啟用 OpenXR",
"@performance_json_text_openxr": {},
"performance_json_text_openxr_info": "連接與 OpenXR 兼容的頭顯,啟動遊戲後,使用數字小鍵盤 / 切換 VR 與 寬屏劇院模式",
"@performance_json_text_openxr_info": {},
"performance_json_text_fov": "設定視角FOV", "performance_json_text_fov": "設定視角FOV",
"@performance_json_text_fov": {}, "@performance_json_text_fov": {},
"performance_json_text_ui_animation": "UI 淡入淡出動畫", "performance_json_text_ui_animation": "UI 淡入淡出動畫",

View File

@ -1,335 +1,344 @@
import 'package:starcitizen_doctor/generated/l10n.dart'; import 'package:starcitizen_doctor/generated/l10n.dart';
List get performanceUIConfJsonData => [ List get performanceUIConfJsonData => [
{ {
"key": "r_ssdo", "key": "r_ssdo",
"name": S.current.performance_json_text_ssdo, "name": S.current.performance_json_text_ssdo,
"info": S.current.performance_json_text_ssdo_info, "info": S.current.performance_json_text_ssdo_info,
"type": "int", "type": "int",
"max": 2, "max": 2,
"min": 0, "min": 0,
"value": 1, "value": 1,
"group": S.current.performance_json_text_title_graphics "group": S.current.performance_json_text_title_graphics,
}, },
{ {
"key": "r_DepthOfField", "key": "r_DepthOfField",
"name": S.current.performance_json_text_dof, "name": S.current.performance_json_text_dof,
"info": S.current.performance_json_text_dof_info, "info": S.current.performance_json_text_dof_info,
"type": "int", "type": "int",
"max": 2, "max": 2,
"min": 0, "min": 0,
"value": 1, "value": 1,
"group": S.current.performance_json_text_title_graphics "group": S.current.performance_json_text_title_graphics,
}, },
{ {
"key": "r_AntialiasingMode", "key": "r_AntialiasingMode",
"name": S.current.performance_json_text_antialiasing, "name": S.current.performance_json_text_antialiasing,
"info": S.current.performance_json_text_antialiasing_info, "info": S.current.performance_json_text_antialiasing_info,
"type": "int", "type": "int",
"max": 3, "max": 3,
"min": 0, "min": 0,
"value": 2, "value": 2,
"group": S.current.performance_json_text_title_graphics "group": S.current.performance_json_text_title_graphics,
}, },
{ {
"key": "sys_spec_gameeffects", "key": "sys_spec_gameeffects",
"name": S.current.performance_json_text_game_effects, "name": S.current.performance_json_text_game_effects,
"info": S.current.performance_json_text_game_effects_info, "info": S.current.performance_json_text_game_effects_info,
"type": "int", "type": "int",
"max": 4, "max": 4,
"min": 1, "min": 1,
"value": 2, "value": 2,
"group": S.current.performance_json_text_title_graphics "group": S.current.performance_json_text_title_graphics,
}, },
{ {
"key": "sys_spec_texture", "key": "sys_spec_texture",
"name": S.current.performance_json_text_texture, "name": S.current.performance_json_text_texture,
"info": S.current.performance_json_text_texture_info, "info": S.current.performance_json_text_texture_info,
"type": "int", "type": "int",
"max": 3, "max": 3,
"min": 1, "min": 1,
"value": 2, "value": 2,
"group": S.current.performance_json_text_title_graphics "group": S.current.performance_json_text_title_graphics,
}, },
{ {
"key": "sys_spec_volumetriceffects", "key": "sys_spec_volumetriceffects",
"name": S.current.performance_json_text_volumetric_effects, "name": S.current.performance_json_text_volumetric_effects,
"info": S.current.performance_json_text_volumetric_effects_info, "info": S.current.performance_json_text_volumetric_effects_info,
"type": "int", "type": "int",
"max": 4, "max": 4,
"min": 1, "min": 1,
"value": 2, "value": 2,
"group": S.current.performance_json_text_title_graphics "group": S.current.performance_json_text_title_graphics,
}, },
{ {
"key": "sys_spec_water", "key": "sys_spec_water",
"name": S.current.performance_json_text_water, "name": S.current.performance_json_text_water,
"info": S.current.performance_json_text_water_info, "info": S.current.performance_json_text_water_info,
"type": "int", "type": "int",
"max": 4, "max": 4,
"min": 1, "min": 1,
"value": 2, "value": 2,
"group": S.current.performance_json_text_title_graphics "group": S.current.performance_json_text_title_graphics,
}, },
{ {
"key": "sys_spec_objectdetail", "key": "sys_spec_objectdetail",
"name": S.current.performance_json_text_object_detail, "name": S.current.performance_json_text_object_detail,
"info": S.current.performance_json_text_object_detail_info, "info": S.current.performance_json_text_object_detail_info,
"type": "int", "type": "int",
"max": 4, "max": 4,
"min": 1, "min": 1,
"value": 2, "value": 2,
"group": S.current.performance_json_text_title_graphics "group": S.current.performance_json_text_title_graphics,
}, },
{ {
"key": "sys_spec_particles", "key": "sys_spec_particles",
"name": S.current.performance_json_text_particles, "name": S.current.performance_json_text_particles,
"info": "", "info": "",
"type": "int", "type": "int",
"max": 4, "max": 4,
"min": 1, "min": 1,
"value": 2, "value": 2,
"group": S.current.performance_json_text_title_graphics "group": S.current.performance_json_text_title_graphics,
}, },
{ {
"key": "sys_spec_physics", "key": "sys_spec_physics",
"name": S.current.performance_json_text_physics, "name": S.current.performance_json_text_physics,
"info": S.current.performance_json_text_physics_info, "info": S.current.performance_json_text_physics_info,
"type": "int", "type": "int",
"max": 4, "max": 4,
"min": 1, "min": 1,
"value": 2, "value": 2,
"group": S.current.performance_json_text_title_graphics "group": S.current.performance_json_text_title_graphics,
}, },
{ {
"key": "sys_spec_shading", "key": "sys_spec_shading",
"name": S.current.performance_json_text_shading, "name": S.current.performance_json_text_shading,
"info": S.current.performance_json_text_shading_info, "info": S.current.performance_json_text_shading_info,
"type": "int", "type": "int",
"max": 4, "max": 4,
"min": 1, "min": 1,
"value": 2, "value": 2,
"group": S.current.performance_json_text_title_graphics "group": S.current.performance_json_text_title_graphics,
}, },
{ {
"key": "sys_spec_shadows", "key": "sys_spec_shadows",
"name": S.current.performance_json_text_shadows, "name": S.current.performance_json_text_shadows,
"info": S.current.performance_json_text_shadows_info, "info": S.current.performance_json_text_shadows_info,
"type": "int", "type": "int",
"max": 4, "max": 4,
"min": 1, "min": 1,
"value": 2, "value": 2,
"group": S.current.performance_json_text_title_graphics "group": S.current.performance_json_text_title_graphics,
}, },
{ {
"key": "sys_spec_postprocessing", "key": "sys_spec_postprocessing",
"name": S.current.performance_json_text_postprocessing, "name": S.current.performance_json_text_postprocessing,
"info": S.current.performance_json_text_postprocessing_info, "info": S.current.performance_json_text_postprocessing_info,
"type": "int", "type": "int",
"max": 4, "max": 4,
"min": 1, "min": 1,
"value": 2, "value": 2,
"group": S.current.performance_json_text_title_graphics "group": S.current.performance_json_text_title_graphics,
}, },
{ {
"key": "q_Renderer", "key": "q_Renderer",
"name": S.current.performance_json_text_renderer, "name": S.current.performance_json_text_renderer,
"info": S.current.performance_json_text_renderer_info, "info": S.current.performance_json_text_renderer_info,
"type": "int", "type": "int",
"max": 3, "max": 3,
"min": 0, "min": 0,
"value": 2, "value": 2,
"group": S.current.performance_json_text_title_graphics "group": S.current.performance_json_text_title_graphics,
}, },
{ {
"key": "q_ShaderDecal", "key": "q_ShaderDecal",
"name": S.current.performance_json_text_shader_decal, "name": S.current.performance_json_text_shader_decal,
"info": S.current.performance_json_text_shader_decal_info, "info": S.current.performance_json_text_shader_decal_info,
"type": "int", "type": "int",
"max": 3, "max": 3,
"min": 0, "min": 0,
"value": 2, "value": 2,
"group": S.current.performance_json_text_title_graphics "group": S.current.performance_json_text_title_graphics,
}, },
{ {
"key": "q_ShaderPostProcess", "key": "q_ShaderPostProcess",
"name": S.current.performance_json_text_shader_post_process, "name": S.current.performance_json_text_shader_post_process,
"info": "", "info": "",
"type": "int", "type": "int",
"max": 3, "max": 3,
"min": 0, "min": 0,
"value": 3, "value": 3,
"group": S.current.performance_json_text_title_graphics "group": S.current.performance_json_text_title_graphics,
}, },
{ {
"key": "q_ShaderFX", "key": "q_ShaderFX",
"name": S.current.performance_json_text_shader_fx, "name": S.current.performance_json_text_shader_fx,
"info": "", "info": "",
"type": "int", "type": "int",
"max": 3, "max": 3,
"min": 0, "min": 0,
"value": 2, "value": 2,
"group": S.current.performance_json_text_title_graphics "group": S.current.performance_json_text_title_graphics,
}, },
{ {
"key": "q_ShaderGeneral", "key": "q_ShaderGeneral",
"name": S.current.performance_json_text_shader_general, "name": S.current.performance_json_text_shader_general,
"info": S.current.performance_json_text_shader_general_info, "info": S.current.performance_json_text_shader_general_info,
"type": "int", "type": "int",
"max": 3, "max": 3,
"min": 0, "min": 0,
"value": 2, "value": 2,
"group": S.current.performance_json_text_title_graphics "group": S.current.performance_json_text_title_graphics,
}, },
{ {
"key": "q_ShaderGlass", "key": "q_ShaderGlass",
"name": S.current.performance_json_text_shader_glass, "name": S.current.performance_json_text_shader_glass,
"info": S.current.performance_json_text_shader_glass_info, "info": S.current.performance_json_text_shader_glass_info,
"type": "int", "type": "int",
"max": 3, "max": 3,
"min": 0, "min": 0,
"value": 2, "value": 2,
"group": S.current.performance_json_text_title_graphics "group": S.current.performance_json_text_title_graphics,
}, },
{ {
"key": "q_ShaderHDR", "key": "q_ShaderHDR",
"name": S.current.performance_json_text_shader_hdr, "name": S.current.performance_json_text_shader_hdr,
"info": S.current.performance_json_text_shader_hdr_info, "info": S.current.performance_json_text_shader_hdr_info,
"type": "int", "type": "int",
"max": 3, "max": 3,
"min": 0, "min": 0,
"value": 2, "value": 2,
"group": S.current.performance_json_text_title_graphics "group": S.current.performance_json_text_title_graphics,
}, },
{ {
"key": "q_ShaderParticle", "key": "q_ShaderParticle",
"name": S.current.performance_json_text_shader_particle, "name": S.current.performance_json_text_shader_particle,
"info": S.current.performance_json_text_shader_particle_info, "info": S.current.performance_json_text_shader_particle_info,
"type": "int", "type": "int",
"max": 3, "max": 3,
"min": 0, "min": 0,
"value": 2, "value": 2,
"group": S.current.performance_json_text_title_graphics "group": S.current.performance_json_text_title_graphics,
}, },
{ {
"key": "q_ShaderTerrain", "key": "q_ShaderTerrain",
"name": S.current.performance_json_text_shader_terrain, "name": S.current.performance_json_text_shader_terrain,
"info": "", "info": "",
"type": "int", "type": "int",
"max": 3, "max": 3,
"min": 0, "min": 0,
"value": 2, "value": 2,
"group": S.current.performance_json_text_title_graphics "group": S.current.performance_json_text_title_graphics,
}, },
{ {
"key": "q_ShaderShadow", "key": "q_ShaderShadow",
"name": S.current.performance_json_text_shader_shadow, "name": S.current.performance_json_text_shader_shadow,
"info": "", "info": "",
"type": "int", "type": "int",
"max": 3, "max": 3,
"min": 0, "min": 0,
"value": 2, "value": 2,
"group": S.current.performance_json_text_title_graphics "group": S.current.performance_json_text_title_graphics,
}, },
{ {
"key": "q_ShaderSky", "key": "q_ShaderSky",
"name": S.current.performance_json_text_shader_sky, "name": S.current.performance_json_text_shader_sky,
"info": "", "info": "",
"type": "int", "type": "int",
"max": 3, "max": 3,
"min": 0, "min": 0,
"value": 2, "value": 2,
"group": S.current.performance_json_text_title_graphics "group": S.current.performance_json_text_title_graphics,
}, },
{ {
"key": "e_ParticlesObjectCollisions", "key": "e_ParticlesObjectCollisions",
"name": S.current.performance_json_text_particles_object_collisions, "name": S.current.performance_json_text_particles_object_collisions,
"info": "info": S.current.performance_json_text_particles_object_collisions_info,
S.current.performance_json_text_particles_object_collisions_info, "type": "int",
"type": "int", "max": 2,
"max": 2, "min": 1,
"min": 1, "value": 1,
"value": 1, "group": S.current.performance_json_text_title_graphics,
"group": S.current.performance_json_text_title_graphics },
}, {
{ "key": "sys.OpenXR",
"key": "r_displayinfo", "name": S.current.performance_json_text_openxr,
"name": S.current.performance_json_text_displayinfo, "info": S.current.performance_json_text_openxr_info,
"info": S.current.performance_json_text_displayinfo_info, "type": "bool",
"type": "int", "max": 1,
"max": 4, "min": 0,
"min": 0, "value": 0,
"value": 1, "group": S.current.app_index_menu_settings,
"group": S.current.app_index_menu_settings },
}, {
{ "key": "r_displayinfo",
"key": "sys_maxFps", "name": S.current.performance_json_text_displayinfo,
"name": S.current.performance_json_text_max_fps, "info": S.current.performance_json_text_displayinfo_info,
"info": S.current.performance_json_text_max_fps_info, "type": "int",
"type": "int", "max": 4,
"max": 300, "min": 0,
"min": 0, "value": 1,
"value": 0, "group": S.current.app_index_menu_settings,
"group": S.current.app_index_menu_settings },
}, {
{ "key": "sys_maxFps",
"key": "r_DisplaySessionInfo", "name": S.current.performance_json_text_max_fps,
"name": S.current.performance_json_text_display_session, "info": S.current.performance_json_text_max_fps_info,
"info": S.current.performance_json_text_display_session_info, "type": "int",
"type": "bool", "max": 300,
"max": 1, "min": 0,
"min": 0, "value": 0,
"value": 0, "group": S.current.app_index_menu_settings,
"group": S.current.app_index_menu_settings },
}, {
{ "key": "r_DisplaySessionInfo",
"key": "r_VSync", "name": S.current.performance_json_text_display_session,
"name": S.current.performance_json_text_vsync, "info": S.current.performance_json_text_display_session_info,
"info": S.current.performance_json_text_vsync_info, "type": "bool",
"type": "bool", "max": 1,
"max": 1, "min": 0,
"min": 0, "value": 0,
"value": 0, "group": S.current.app_index_menu_settings,
"group": S.current.app_index_menu_settings },
}, {
{ "key": "r_VSync",
"key": "r_MotionBlur", "name": S.current.performance_json_text_vsync,
"name": S.current.performance_json_text_motion_blur, "info": S.current.performance_json_text_vsync_info,
"info": S.current.performance_json_text_motion_blur_info, "type": "bool",
"type": "bool", "max": 1,
"max": 1, "min": 0,
"min": 0, "value": 0,
"value": 0, "group": S.current.app_index_menu_settings,
"group": S.current.app_index_menu_settings },
}, {
{ "key": "r_MotionBlur",
"key": "cl_fov", "name": S.current.performance_json_text_motion_blur,
"name": "FOV", "info": S.current.performance_json_text_motion_blur_info,
"info": S.current.performance_json_text_fov, "type": "bool",
"type": "int", "max": 1,
"max": 160, "min": 0,
"min": 25, "value": 0,
"value": 90, "group": S.current.app_index_menu_settings,
"group": S.current.app_index_menu_settings },
}, {
{ "key": "cl_fov",
"key": "ui_disableScreenFade", "name": "FOV",
"name": S.current.performance_json_text_ui_animation, "info": S.current.performance_json_text_fov,
"info": "", "type": "int",
"type": "bool", "max": 160,
"max": 1, "min": 25,
"min": 0, "value": 90,
"value": 1, "group": S.current.app_index_menu_settings,
"group": S.current.app_index_menu_settings },
}, {
{ "key": "ui_disableScreenFade",
"key": "customize", "name": S.current.performance_json_text_ui_animation,
"name": S.current.performance_json_text_custom_parameters, "info": "",
"info": "", "type": "bool",
"type": "customize", "max": 1,
"max": 1, "min": 0,
"min": 0, "value": 1,
"value": 1, "group": S.current.app_index_menu_settings,
"group": S.current.performance_json_text_title_custom },
} {
]; "key": "customize",
"name": S.current.performance_json_text_custom_parameters,
"info": "",
"type": "customize",
"max": 1,
"min": 0,
"value": 1,
"group": S.current.performance_json_text_title_custom,
},
];

View File

@ -87,8 +87,14 @@ class HomePerformanceUIModel extends _$HomePerformanceUIModel {
for (var m in state.performanceMap!.entries) { for (var m in state.performanceMap!.entries) {
for (var value in m.value) { for (var value in m.value) {
if (value.key == kv[0].trim()) { if (value.key == kv[0].trim()) {
final v = int.tryParse(kv[1].trim()); var v = int.tryParse(kv[1].trim());
if (v != null) value.value = v; if (v != null) {
// Special mapping for sys.OpenXR: 42 -> 1
if (value.key == "sys.OpenXR" && v == 42) {
v = 1;
}
value.value = v;
}
} }
} }
} }
@ -188,7 +194,18 @@ class HomePerformanceUIModel extends _$HomePerformanceUIModel {
for (var v in state.performanceMap!.entries) { for (var v in state.performanceMap!.entries) {
for (var c in v.value) { for (var c in v.value) {
if (c.key != "customize") { if (c.key != "customize") {
conf = "$conf${c.key}=${c.value}\n"; // Skip writing configuration if value equals default value
if (c.value == c.defaultValue) {
continue;
}
// Special mapping for sys.OpenXR: 1 -> 42
var outputValue = c.value;
if (c.key == "sys.OpenXR" && c.value == 1) {
outputValue = 42;
}
conf = "$conf${c.key}=$outputValue\n";
} }
} }
} }