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/UsageInstructions.tsx | 5 +++++
 1 file changed, 5 insertions(+)

(limited to 'src/components/UsageInstructions.tsx')

diff --git a/src/components/UsageInstructions.tsx b/src/components/UsageInstructions.tsx
index bf80630..3589c04 100644
--- a/src/components/UsageInstructions.tsx
+++ b/src/components/UsageInstructions.tsx
@@ -8,6 +8,7 @@ interface ConfigType {
   perfMode: boolean;
   immediateMode: boolean;
   disableVkbasalt: boolean;
+  frameCap: number;
 }
 
 interface UsageInstructionsProps {
@@ -45,6 +46,10 @@ export function UsageInstructions({ config }: UsageInstructionsProps) {
       envVars.push("DISABLE_VKBASALT=1");
     }
     
+    if (config.frameCap > 0) {
+      envVars.push(`DXVK_FRAME_RATE=${config.frameCap}`);
+    }
+    
     return envVars.length > 0 ? `${envVars.join(" ")} %command%` : "%command%";
   };
 
-- 
cgit v1.2.3


From 7868396718b13443209e7c5d83a2c96cd7eee31e Mon Sep 17 00:00:00 2001
From: xXJSONDeruloXx <danielhimebauch@gmail.com>
Date: Wed, 16 Jul 2025 13:54:09 -0400
Subject:  centralized configuration system for lsfg-vk params

---
 src/components/UsageInstructions.tsx | 30 ++++++++++--------------------
 1 file changed, 10 insertions(+), 20 deletions(-)

(limited to 'src/components/UsageInstructions.tsx')

diff --git a/src/components/UsageInstructions.tsx b/src/components/UsageInstructions.tsx
index 3589c04..727a0ab 100644
--- a/src/components/UsageInstructions.tsx
+++ b/src/components/UsageInstructions.tsx
@@ -1,18 +1,8 @@
 import { PanelSectionRow } from "@decky/ui";
-
-interface ConfigType {
-  enableLsfg: boolean;
-  multiplier: number;
-  flowScale: number;
-  hdr: boolean;
-  perfMode: boolean;
-  immediateMode: boolean;
-  disableVkbasalt: boolean;
-  frameCap: number;
-}
+import { ConfigurationData } from "../config/configSchema";
 
 interface UsageInstructionsProps {
-  config: ConfigType;
+  config: ConfigurationData;
 }
 
 export function UsageInstructions({ config }: UsageInstructionsProps) {
@@ -20,34 +10,34 @@ export function UsageInstructions({ config }: UsageInstructionsProps) {
   const buildManualEnvVars = (): string => {
     const envVars: string[] = [];
     
-    if (config.enableLsfg) {
+    if (config.enable_lsfg) {
       envVars.push("ENABLE_LSFG=1");
     }
     
     // Always include multiplier and flow_scale if LSFG is enabled, as they have defaults
-    if (config.enableLsfg) {
+    if (config.enable_lsfg) {
       envVars.push(`LSFG_MULTIPLIER=${config.multiplier}`);
-      envVars.push(`LSFG_FLOW_SCALE=${config.flowScale}`);
+      envVars.push(`LSFG_FLOW_SCALE=${config.flow_scale}`);
     }
     
     if (config.hdr) {
       envVars.push("LSFG_HDR=1");
     }
     
-    if (config.perfMode) {
+    if (config.perf_mode) {
       envVars.push("LSFG_PERF_MODE=1");
     }
     
-    if (config.immediateMode) {
+    if (config.immediate_mode) {
       envVars.push("MESA_VK_WSI_PRESENT_MODE=immediate");
     }
     
-    if (config.disableVkbasalt) {
+    if (config.disable_vkbasalt) {
       envVars.push("DISABLE_VKBASALT=1");
     }
     
-    if (config.frameCap > 0) {
-      envVars.push(`DXVK_FRAME_RATE=${config.frameCap}`);
+    if (config.frame_cap > 0) {
+      envVars.push(`DXVK_FRAME_RATE=${config.frame_cap}`);
     }
     
     return envVars.length > 0 ? `${envVars.join(" ")} %command%` : "%command%";
-- 
cgit v1.2.3

