summaryrefslogtreecommitdiff
path: root/py_modules
diff options
context:
space:
mode:
authorxXJSONDeruloXx <danielhimebauch@gmail.com>2025-07-22 11:11:44 -0400
committerxXJSONDeruloXx <danielhimebauch@gmail.com>2025-07-22 11:11:44 -0400
commitc02343e68874efd57c2e312cb6b7e4f02222e43a (patch)
tree31e7a46aca624de9eeb778f2337b2c0d9906b628 /py_modules
parent97bb41947bd44a712ad26905771a9d2cc4692878 (diff)
downloaddecky-lsfg-vk-c02343e68874efd57c2e312cb6b7e4f02222e43a.tar.gz
decky-lsfg-vk-c02343e68874efd57c2e312cb6b7e4f02222e43a.zip
add workaround env vars, rm old tests
Diffstat (limited to 'py_modules')
-rw-r--r--py_modules/lsfg_vk/config_schema.py28
-rw-r--r--py_modules/lsfg_vk/configuration.py19
-rw-r--r--py_modules/lsfg_vk/plugin.py9
3 files changed, 49 insertions, 7 deletions
diff --git a/py_modules/lsfg_vk/config_schema.py b/py_modules/lsfg_vk/config_schema.py
index c82d1d3..6a68db1 100644
--- a/py_modules/lsfg_vk/config_schema.py
+++ b/py_modules/lsfg_vk/config_schema.py
@@ -73,6 +73,20 @@ SCRIPT_ONLY_FIELDS = {
field_type=ConfigFieldType.BOOLEAN,
default=False,
description="disable Steam Deck mode (unlocks hidden settings in some games)"
+ ),
+
+ "mangohud_workaround": ConfigField(
+ name="mangohud_workaround",
+ field_type=ConfigFieldType.BOOLEAN,
+ default=False,
+ description="Enables a transparent mangohud overlay, sometimes fixes issues with 2X multiplier in game mode"
+ ),
+
+ "disable_vkbasalt": ConfigField(
+ name="disable_vkbasalt",
+ field_type=ConfigFieldType.BOOLEAN,
+ default=False,
+ description="Disables vkBasalt layer which can conflict with LSFG (Reshade, some Decky plugins)"
)
}
@@ -91,6 +105,8 @@ class ConfigurationData(TypedDict):
dxvk_frame_rate: int
enable_wow64: bool
disable_steamdeck_mode: bool
+ mangohud_workaround: bool
+ disable_vkbasalt: bool
class ConfigurationManager:
@@ -335,6 +351,10 @@ class ConfigurationManager:
script_values["enable_wow64"] = value == "1"
elif key == "SteamDeck":
script_values["disable_steamdeck_mode"] = value == "0"
+ elif key == "MANGOHUD":
+ script_values["mangohud_workaround"] = value == "1"
+ elif key == "DISABLE_VKBASALT":
+ script_values["disable_vkbasalt"] = value == "1"
except (ValueError, KeyError, IndexError) as e:
# If parsing fails, log the error and return empty dict (will use defaults)
@@ -368,7 +388,9 @@ class ConfigurationManager:
experimental_present_mode: str = "fifo",
dxvk_frame_rate: int = 0,
enable_wow64: bool = False,
- disable_steamdeck_mode: bool = False) -> ConfigurationData:
+ disable_steamdeck_mode: bool = False,
+ mangohud_workaround: bool = False,
+ disable_vkbasalt: bool = False) -> ConfigurationData:
"""Create configuration from individual arguments"""
return cast(ConfigurationData, {
"dll": dll,
@@ -379,5 +401,7 @@ class ConfigurationManager:
"experimental_present_mode": experimental_present_mode,
"dxvk_frame_rate": dxvk_frame_rate,
"enable_wow64": enable_wow64,
- "disable_steamdeck_mode": disable_steamdeck_mode
+ "disable_steamdeck_mode": disable_steamdeck_mode,
+ "mangohud_workaround": mangohud_workaround,
+ "disable_vkbasalt": disable_vkbasalt
})
diff --git a/py_modules/lsfg_vk/configuration.py b/py_modules/lsfg_vk/configuration.py
index 47d0ebc..82982e5 100644
--- a/py_modules/lsfg_vk/configuration.py
+++ b/py_modules/lsfg_vk/configuration.py
@@ -65,7 +65,9 @@ class ConfigurationService(BaseService):
experimental_present_mode: str = "fifo",
dxvk_frame_rate: int = 0,
enable_wow64: bool = False,
- disable_steamdeck_mode: bool = False) -> ConfigurationResponse:
+ disable_steamdeck_mode: bool = False,
+ mangohud_workaround: bool = False,
+ disable_vkbasalt: bool = False) -> ConfigurationResponse:
"""Update TOML configuration
Args:
@@ -78,6 +80,8 @@ class ConfigurationService(BaseService):
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
Returns:
ConfigurationResponse with success status
@@ -86,7 +90,8 @@ class ConfigurationService(BaseService):
# Create configuration from individual arguments
config = ConfigurationManager.create_config_from_args(
dll, multiplier, flow_scale, performance_mode, hdr_mode,
- experimental_present_mode, dxvk_frame_rate, enable_wow64, disable_steamdeck_mode
+ experimental_present_mode, dxvk_frame_rate, enable_wow64, disable_steamdeck_mode,
+ mangohud_workaround, disable_vkbasalt
)
# Generate TOML content using centralized manager
@@ -108,7 +113,8 @@ class ConfigurationService(BaseService):
f"performance_mode={performance_mode}, hdr_mode={hdr_mode}, "
f"experimental_present_mode='{experimental_present_mode}', "
f"dxvk_frame_rate={dxvk_frame_rate}, "
- f"enable_wow64={enable_wow64}, disable_steamdeck_mode={disable_steamdeck_mode}")
+ f"enable_wow64={enable_wow64}, disable_steamdeck_mode={disable_steamdeck_mode}, "
+ f"mangohud_workaround={mangohud_workaround}, disable_vkbasalt={disable_vkbasalt}")
return self._success_response(ConfigurationResponse,
"lsfg configuration updated successfully",
@@ -214,6 +220,13 @@ class ConfigurationService(BaseService):
if config.get("disable_steamdeck_mode", False):
lines.append("export SteamDeck=0")
+ if config.get("mangohud_workaround", False):
+ lines.append("export MANGOHUD=1")
+ lines.append("export MANGOHUD_CONFIG=alpha=0.01,background_alpha=0.01")
+
+ if config.get("disable_vkbasalt", False):
+ lines.append("export DISABLE_VKBASALT=1")
+
# Add DXVK_FRAME_RATE if dxvk_frame_rate is set
dxvk_frame_rate = config.get("dxvk_frame_rate", 0)
if dxvk_frame_rate > 0:
diff --git a/py_modules/lsfg_vk/plugin.py b/py_modules/lsfg_vk/plugin.py
index 425d7e7..7deed71 100644
--- a/py_modules/lsfg_vk/plugin.py
+++ b/py_modules/lsfg_vk/plugin.py
@@ -189,7 +189,9 @@ class Plugin:
experimental_present_mode: str = "fifo",
dxvk_frame_rate: int = 0,
enable_wow64: bool = False,
- disable_steamdeck_mode: bool = False) -> Dict[str, Any]:
+ disable_steamdeck_mode: bool = False,
+ mangohud_workaround: bool = False,
+ disable_vkbasalt: bool = False) -> Dict[str, Any]:
"""Update lsfg TOML configuration
Args:
@@ -202,13 +204,16 @@ class Plugin:
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
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
+ experimental_present_mode, dxvk_frame_rate, enable_wow64, disable_steamdeck_mode,
+ mangohud_workaround, disable_vkbasalt
)
async def update_dll_path(self, dll_path: str) -> Dict[str, Any]: