diff options
Diffstat (limited to 'py_modules/lsfg_vk/config_schema.py')
| -rw-r--r-- | py_modules/lsfg_vk/config_schema.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/py_modules/lsfg_vk/config_schema.py b/py_modules/lsfg_vk/config_schema.py index 3a82bbd..f76b5f2 100644 --- a/py_modules/lsfg_vk/config_schema.py +++ b/py_modules/lsfg_vk/config_schema.py @@ -178,7 +178,7 @@ class ConfigurationManager: "profiles": {DEFAULT_PROFILE_NAME: config}, "global_config": { "dll": config.get("dll", ""), - "no_fp16": False # Always enabled even if previously set + "no_fp16": config.get("no_fp16", False) } } return ConfigurationManager.generate_toml_content_multi_profile(profile_data) @@ -188,7 +188,7 @@ class ConfigurationManager: """Generate TOML configuration file content with multiple profiles""" lines = ["version = 1"] lines.append("") - + # Add global section with global fields lines.append("[global]") @@ -202,10 +202,11 @@ class ConfigurationManager: if dll_path: lines.append(f"# specify where Lossless.dll is stored") lines.append(f'dll = "{dll_path}"') - lines.append("") - + lines.append("") + lines.append(f"# FP16 acceleration") - lines.append(f"no_fp16 = false") + no_fp16 = bool(profile_data["global_config"].get("no_fp16", False)) + lines.append(f"no_fp16 = {str(no_fp16).lower()}") lines.append("") # Add game sections for each profile @@ -339,8 +340,7 @@ class ConfigurationManager: elif key == "dll": global_config["dll"] = value elif key == "no_fp16": - # Always enforce FP16 to be enabled (no_fp16 = false) - global_config["no_fp16"] = False + global_config["no_fp16"] = value.lower() in ('true', '1', 'yes', 'on') # Handle game section elif in_game_section: |
