diff options
| author | xXJSONDeruloXx <danielhimebauch@gmail.com> | 2025-07-16 10:42:54 -0400 |
|---|---|---|
| committer | xXJSONDeruloXx <danielhimebauch@gmail.com> | 2025-07-16 10:42:54 -0400 |
| commit | eb1c32ee61d4d4098feb1441ea5bf3b73f520780 (patch) | |
| tree | 4aa33d86c429f10f41051b5db0b7a494ff93c082 /src/components/ConfigurationSection.tsx | |
| parent | 80247f76332d2704e21361192b774f31b1520e57 (diff) | |
| download | decky-lsfg-vk-eb1c32ee61d4d4098feb1441ea5bf3b73f520780.tar.gz decky-lsfg-vk-eb1c32ee61d4d4098feb1441ea5bf3b73f520780.zip | |
initial add of fps cap ui toggle
Diffstat (limited to 'src/components/ConfigurationSection.tsx')
| -rw-r--r-- | src/components/ConfigurationSection.tsx | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/src/components/ConfigurationSection.tsx b/src/components/ConfigurationSection.tsx index 34955f8..6c6f50a 100644 --- a/src/components/ConfigurationSection.tsx +++ b/src/components/ConfigurationSection.tsx @@ -8,6 +8,7 @@ interface LsfgConfig { perfMode: boolean; immediateMode: boolean; disableVkbasalt: boolean; + frameCap: number; } interface ConfigurationSectionProps { @@ -19,6 +20,7 @@ interface ConfigurationSectionProps { onPerfModeChange: (value: boolean) => Promise<void>; onImmediateModeChange: (value: boolean) => Promise<void>; onDisableVkbasaltChange: (value: boolean) => Promise<void>; + onFrameCapChange: (value: number) => Promise<void>; } export function ConfigurationSection({ @@ -29,7 +31,8 @@ export function ConfigurationSection({ onHdrChange, onPerfModeChange, onImmediateModeChange, - onDisableVkbasaltChange + onDisableVkbasaltChange, + onFrameCapChange }: ConfigurationSectionProps) { return ( <> @@ -114,6 +117,28 @@ export function ConfigurationSection({ /> </PanelSectionRow> + <PanelSectionRow> + <SliderField + label={`Game Frame Cap ${config.frameCap === 0 ? "(Disabled)" : `(${config.frameCap} FPS)`}`} + description="Limit frame rate using DXVK_FRAME_RATE (0 = disabled)" + value={config.frameCap} + min={0} + max={60} + step={5} + notchCount={7} + notchLabels={[ + { notchIndex: 0, label: "Off" }, + { notchIndex: 1, label: "10" }, + { notchIndex: 2, label: "20" }, + { notchIndex: 3, label: "30" }, + { notchIndex: 4, label: "40" }, + { notchIndex: 5, label: "50" }, + { notchIndex: 6, label: "60" } + ]} + onChange={onFrameCapChange} + /> + </PanelSectionRow> + {/* <PanelSectionRow> <ToggleField label="Disable vkbasalt" |
