diff options
| author | xXJSONDeruloXx <danielhimebauch@gmail.com> | 2025-07-17 14:35:06 -0400 |
|---|---|---|
| committer | xXJSONDeruloXx <danielhimebauch@gmail.com> | 2025-07-17 14:35:06 -0400 |
| commit | 57bd1cd9fcbbc8d4cd1d2f45106fc29d00bb6918 (patch) | |
| tree | 3acac7bcad782af3f70a2fbd114ac63dff5919f5 /py_modules/lsfg_vk/config_schema.py | |
| parent | 6b701637ad308513b678c80baceec6c79e339ce9 (diff) | |
| download | decky-lsfg-vk-57bd1cd9fcbbc8d4cd1d2f45106fc29d00bb6918.tar.gz decky-lsfg-vk-57bd1cd9fcbbc8d4cd1d2f45106fc29d00bb6918.zip | |
write dll path when discovered
Diffstat (limited to 'py_modules/lsfg_vk/config_schema.py')
| -rw-r--r-- | py_modules/lsfg_vk/config_schema.py | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/py_modules/lsfg_vk/config_schema.py b/py_modules/lsfg_vk/config_schema.py index f054abf..8c5f58c 100644 --- a/py_modules/lsfg_vk/config_schema.py +++ b/py_modules/lsfg_vk/config_schema.py @@ -48,7 +48,7 @@ CONFIG_SCHEMA: Dict[str, ConfigField] = { "dll": ConfigField( name="dll", field_type=ConfigFieldType.STRING, - default="/games/Lossless Scaling/Lossless.dll", + default="", # Will be populated dynamically based on detection description="specify where Lossless.dll is stored" ), @@ -104,6 +104,34 @@ class ConfigurationManager: }) @staticmethod + def get_defaults_with_dll_detection(dll_detection_service=None) -> ConfigurationData: + """Get default configuration values with DLL path detection + + Args: + dll_detection_service: Optional DLL detection service instance + + Returns: + ConfigurationData with detected DLL path if available + """ + defaults = ConfigurationManager.get_defaults() + + # Try to detect DLL path if service provided + if dll_detection_service: + try: + dll_result = dll_detection_service.check_lossless_scaling_dll() + if dll_result.get("detected") and dll_result.get("path"): + defaults["dll"] = dll_result["path"] + except Exception: + # If detection fails, keep empty default + pass + + # If DLL path is still empty, use a reasonable fallback + if not defaults["dll"]: + defaults["dll"] = "/home/deck/.local/share/Steam/steamapps/common/Lossless Scaling/Lossless.dll" + + return defaults + + @staticmethod def get_field_names() -> list[str]: """Get ordered list of configuration field names""" return list(CONFIG_SCHEMA.keys()) |
