summaryrefslogtreecommitdiff
path: root/py_modules/lsfg_vk/plugin.py
diff options
context:
space:
mode:
authorKurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com>2025-07-16 16:35:34 -0400
committerGitHub <noreply@github.com>2025-07-16 16:35:34 -0400
commit44393f6e126c3dff196283a2079162e3eb9245a2 (patch)
tree46fdc7e70e272ac6a33259d1228233496b54371b /py_modules/lsfg_vk/plugin.py
parent80247f76332d2704e21361192b774f31b1520e57 (diff)
parent7c8f336196c215d90588f1994fa1556c7790dba8 (diff)
downloaddecky-lsfg-vk-44393f6e126c3dff196283a2079162e3eb9245a2.tar.gz
decky-lsfg-vk-44393f6e126c3dff196283a2079162e3eb9245a2.zip
Merge pull request #30 from xXJSONDeruloXx/fps-limit
Fps limit
Diffstat (limited to 'py_modules/lsfg_vk/plugin.py')
-rw-r--r--py_modules/lsfg_vk/plugin.py22
1 files changed, 18 insertions, 4 deletions
diff --git a/py_modules/lsfg_vk/plugin.py b/py_modules/lsfg_vk/plugin.py
index 5fb6c8f..b357ee6 100644
--- a/py_modules/lsfg_vk/plugin.py
+++ b/py_modules/lsfg_vk/plugin.py
@@ -11,6 +11,7 @@ from typing import Dict, Any
from .installation import InstallationService
from .dll_detection import DllDetectionService
from .configuration import ConfigurationService
+from .config_schema import ConfigurationManager
class Plugin:
@@ -72,24 +73,37 @@ class Plugin:
"""
return self.configuration_service.get_config()
+ async def get_config_schema(self) -> Dict[str, Any]:
+ """Get configuration schema information for frontend
+
+ Returns:
+ Dict with field names, types, and defaults
+ """
+ return {
+ "field_names": ConfigurationManager.get_field_names(),
+ "field_types": {name: field_type.value for name, field_type in ConfigurationManager.get_field_types().items()},
+ "defaults": ConfigurationManager.get_defaults()
+ }
+
async def update_lsfg_config(self, enable_lsfg: bool, multiplier: int, flow_scale: float,
- hdr: bool, perf_mode: bool, immediate_mode: bool, disable_vkbasalt: bool) -> Dict[str, Any]:
+ hdr: bool, perf_mode: bool, immediate_mode: bool, disable_vkbasalt: bool, frame_cap: int) -> Dict[str, Any]:
"""Update lsfg script configuration
Args:
enable_lsfg: Whether to enable LSFG
- multiplier: LSFG multiplier value (typically 2-4)
- flow_scale: LSFG flow scale value (typically 0.5-2.0)
+ multiplier: LSFG multiplier value
+ flow_scale: LSFG flow scale value
hdr: Whether to enable HDR
perf_mode: Whether to enable performance mode
immediate_mode: Whether to enable immediate present mode (disable vsync)
disable_vkbasalt: Whether to disable vkbasalt layer
+ frame_cap: Frame rate cap value (0-60, 0 = disabled)
Returns:
ConfigurationResponse dict with success status
"""
return self.configuration_service.update_config(
- enable_lsfg, multiplier, flow_scale, hdr, perf_mode, immediate_mode, disable_vkbasalt
+ enable_lsfg, multiplier, flow_scale, hdr, perf_mode, immediate_mode, disable_vkbasalt, frame_cap
)
# Plugin lifecycle methods