From eb1c32ee61d4d4098feb1441ea5bf3b73f520780 Mon Sep 17 00:00:00 2001 From: xXJSONDeruloXx Date: Wed, 16 Jul 2025 10:42:54 -0400 Subject: initial add of fps cap ui toggle --- src/components/ConfigurationSection.tsx | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'src/components/ConfigurationSection.tsx') 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; onImmediateModeChange: (value: boolean) => Promise; onDisableVkbasaltChange: (value: boolean) => Promise; + onFrameCapChange: (value: number) => Promise; } 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({ /> + + + + {/* Date: Wed, 16 Jul 2025 11:33:17 -0400 Subject: slider non notches for fps capper --- src/components/ConfigurationSection.tsx | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'src/components/ConfigurationSection.tsx') diff --git a/src/components/ConfigurationSection.tsx b/src/components/ConfigurationSection.tsx index 6c6f50a..ab1e1b7 100644 --- a/src/components/ConfigurationSection.tsx +++ b/src/components/ConfigurationSection.tsx @@ -124,17 +124,7 @@ export function ConfigurationSection({ 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" } - ]} + step={1} onChange={onFrameCapChange} /> -- cgit v1.2.3 From 1bc7e97c0a915f2d3c035a65659cea4e37aa9ad6 Mon Sep 17 00:00:00 2001 From: xXJSONDeruloXx Date: Wed, 16 Jul 2025 11:37:40 -0400 Subject: revise desc of fps slider --- src/components/ConfigurationSection.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/components/ConfigurationSection.tsx') diff --git a/src/components/ConfigurationSection.tsx b/src/components/ConfigurationSection.tsx index ab1e1b7..11bb6b9 100644 --- a/src/components/ConfigurationSection.tsx +++ b/src/components/ConfigurationSection.tsx @@ -120,7 +120,7 @@ export function ConfigurationSection({ Date: Wed, 16 Jul 2025 13:54:09 -0400 Subject: centralized configuration system for lsfg-vk params --- src/components/ConfigurationSection.tsx | 64 +++++++++++---------------------- 1 file changed, 20 insertions(+), 44 deletions(-) (limited to 'src/components/ConfigurationSection.tsx') diff --git a/src/components/ConfigurationSection.tsx b/src/components/ConfigurationSection.tsx index 11bb6b9..2545217 100644 --- a/src/components/ConfigurationSection.tsx +++ b/src/components/ConfigurationSection.tsx @@ -1,38 +1,14 @@ import { PanelSectionRow, ToggleField, SliderField } from "@decky/ui"; - -interface LsfgConfig { - enableLsfg: boolean; - multiplier: number; - flowScale: number; - hdr: boolean; - perfMode: boolean; - immediateMode: boolean; - disableVkbasalt: boolean; - frameCap: number; -} +import { ConfigurationData } from "../config/configSchema"; interface ConfigurationSectionProps { - config: LsfgConfig; - onEnableLsfgChange: (value: boolean) => Promise; - onMultiplierChange: (value: number) => Promise; - onFlowScaleChange: (value: number) => Promise; - onHdrChange: (value: boolean) => Promise; - onPerfModeChange: (value: boolean) => Promise; - onImmediateModeChange: (value: boolean) => Promise; - onDisableVkbasaltChange: (value: boolean) => Promise; - onFrameCapChange: (value: number) => Promise; + config: ConfigurationData; + onConfigChange: (fieldName: keyof ConfigurationData, value: boolean | number) => Promise; } export function ConfigurationSection({ config, - onEnableLsfgChange, - onMultiplierChange, - onFlowScaleChange, - onHdrChange, - onPerfModeChange, - onImmediateModeChange, - onDisableVkbasaltChange, - onFrameCapChange + onConfigChange }: ConfigurationSectionProps) { return ( <> @@ -55,8 +31,8 @@ export function ConfigurationSection({ onConfigChange('enable_lsfg', value)} /> @@ -74,19 +50,19 @@ export function ConfigurationSection({ { notchIndex: 1, label: "3X" }, { notchIndex: 2, label: "4X" } ]} - onChange={onMultiplierChange} + onChange={(value) => onConfigChange('multiplier', value)} /> onConfigChange('flow_scale', value)} /> @@ -95,7 +71,7 @@ export function ConfigurationSection({ label="HDR Mode" description="Enable HDR mode (only if Game supports HDR)" checked={config.hdr} - onChange={onHdrChange} + onChange={(value) => onConfigChange('hdr', value)} /> @@ -103,8 +79,8 @@ export function ConfigurationSection({ onConfigChange('perf_mode', value)} /> @@ -112,20 +88,20 @@ export function ConfigurationSection({ onConfigChange('immediate_mode', value)} /> onConfigChange('frame_cap', value)} /> @@ -133,8 +109,8 @@ export function ConfigurationSection({ onConfigChange('disable_vkbasalt', value)} /> */} -- cgit v1.2.3