diff options
| author | Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com> | 2025-07-22 13:33:13 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-22 13:33:13 -0400 |
| commit | 42668d412105b972e0cc7440b64e8e24aeef4587 (patch) | |
| tree | c8f20ccbe508ac6684a38c115d63602476575493 /py_modules/lsfg_vk/plugin.py | |
| parent | 97bb41947bd44a712ad26905771a9d2cc4692878 (diff) | |
| parent | 43def41747d3b75bb547b649a00f12653c3ae537 (diff) | |
| download | decky-lsfg-vk-42668d412105b972e0cc7440b64e8e24aeef4587.tar.gz decky-lsfg-vk-42668d412105b972e0cc7440b64e8e24aeef4587.zip | |
Merge pull request #67 from xXJSONDeruloXx/workaround-envs
add workaround env vars, rm old tests
Diffstat (limited to 'py_modules/lsfg_vk/plugin.py')
| -rw-r--r-- | py_modules/lsfg_vk/plugin.py | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/py_modules/lsfg_vk/plugin.py b/py_modules/lsfg_vk/plugin.py index 425d7e7..8fa2435 100644 --- a/py_modules/lsfg_vk/plugin.py +++ b/py_modules/lsfg_vk/plugin.py @@ -184,32 +184,20 @@ class Plugin: "defaults": ConfigurationManager.get_defaults() } - async def update_lsfg_config(self, dll: str, multiplier: int, flow_scale: float, - performance_mode: bool, hdr_mode: bool, - experimental_present_mode: str = "fifo", - dxvk_frame_rate: int = 0, - enable_wow64: bool = False, - disable_steamdeck_mode: bool = False) -> Dict[str, Any]: - """Update lsfg TOML configuration + async def update_lsfg_config(self, config: Dict[str, Any]) -> Dict[str, Any]: + """Update lsfg TOML configuration using object-based API (single source of truth) Args: - dll: Path to Lossless.dll - multiplier: LSFG multiplier value - flow_scale: LSFG flow scale value - performance_mode: Whether to enable performance mode - hdr_mode: Whether to enable HDR mode - experimental_present_mode: Experimental Vulkan present mode override - dxvk_frame_rate: Frame rate cap for DirectX games, before frame multiplier (0 = disabled) - enable_wow64: Whether to enable PROTON_USE_WOW64=1 for 32-bit games - disable_steamdeck_mode: Whether to disable Steam Deck mode + config: Configuration data dictionary containing all settings Returns: ConfigurationResponse dict with success status """ - return self.configuration_service.update_config( - dll, multiplier, flow_scale, performance_mode, hdr_mode, - experimental_present_mode, dxvk_frame_rate, enable_wow64, disable_steamdeck_mode - ) + # Validate and extract configuration from the config dict + validated_config = ConfigurationManager.validate_config(config) + + # Use dynamic parameter passing based on schema + return self.configuration_service.update_config_from_dict(validated_config) async def update_dll_path(self, dll_path: str) -> Dict[str, Any]: """Update the DLL path in the configuration when detected |
