From eb1c32ee61d4d4098feb1441ea5bf3b73f520780 Mon Sep 17 00:00:00 2001
From: xXJSONDeruloXx <danielhimebauch@gmail.com>
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<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"
-- 
cgit v1.2.3

