summaryrefslogtreecommitdiff
path: root/py_modules/lsfg_vk
diff options
context:
space:
mode:
Diffstat (limited to 'py_modules/lsfg_vk')
-rw-r--r--py_modules/lsfg_vk/configuration.py2
-rw-r--r--py_modules/lsfg_vk/plugin.py40
2 files changed, 18 insertions, 24 deletions
diff --git a/py_modules/lsfg_vk/configuration.py b/py_modules/lsfg_vk/configuration.py
index 82982e5..68ff577 100644
--- a/py_modules/lsfg_vk/configuration.py
+++ b/py_modules/lsfg_vk/configuration.py
@@ -222,7 +222,7 @@ class ConfigurationService(BaseService):
if config.get("mangohud_workaround", False):
lines.append("export MANGOHUD=1")
- lines.append("export MANGOHUD_CONFIG=alpha=0.01,background_alpha=0.01")
+ lines.append("export MANGOHUD_CONFIG=alpha=0.001,background_alpha=0.001")
if config.get("disable_vkbasalt", False):
lines.append("export DISABLE_VKBASALT=1")
diff --git a/py_modules/lsfg_vk/plugin.py b/py_modules/lsfg_vk/plugin.py
index 7deed71..d126d84 100644
--- a/py_modules/lsfg_vk/plugin.py
+++ b/py_modules/lsfg_vk/plugin.py
@@ -184,36 +184,30 @@ 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,
- mangohud_workaround: bool = False,
- disable_vkbasalt: 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
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
- mangohud_workaround: Whether to enable MangoHud workaround with transparent overlay
- disable_vkbasalt: Whether to disable vkBasalt layer
+ config: Configuration data dictionary containing all settings
Returns:
ConfigurationResponse dict with success status
"""
+ # Validate and extract configuration from the config dict
+ validated_config = ConfigurationManager.validate_config(config)
+
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,
- mangohud_workaround, disable_vkbasalt
+ dll=validated_config["dll"],
+ multiplier=validated_config["multiplier"],
+ flow_scale=validated_config["flow_scale"],
+ performance_mode=validated_config["performance_mode"],
+ hdr_mode=validated_config["hdr_mode"],
+ experimental_present_mode=validated_config["experimental_present_mode"],
+ dxvk_frame_rate=validated_config["dxvk_frame_rate"],
+ enable_wow64=validated_config["enable_wow64"],
+ disable_steamdeck_mode=validated_config["disable_steamdeck_mode"],
+ mangohud_workaround=validated_config["mangohud_workaround"],
+ disable_vkbasalt=validated_config["disable_vkbasalt"]
)
async def update_dll_path(self, dll_path: str) -> Dict[str, Any]: