summaryrefslogtreecommitdiff
path: root/src/components/UsageInstructions.tsx
diff options
context:
space:
mode:
authorKurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com>2025-07-16 16:27:30 -0400
committerGitHub <noreply@github.com>2025-07-16 16:27:30 -0400
commit7c8f336196c215d90588f1994fa1556c7790dba8 (patch)
tree46fdc7e70e272ac6a33259d1228233496b54371b /src/components/UsageInstructions.tsx
parent41bba67d24241dea18b056734b153270bb230ba1 (diff)
parent5c739d6eca3aacea5dd9e48fa63471b27c86f0e2 (diff)
downloaddecky-lsfg-vk-7c8f336196c215d90588f1994fa1556c7790dba8.tar.gz
decky-lsfg-vk-7c8f336196c215d90588f1994fa1556c7790dba8.zip
Merge pull request #28 from xXJSONDeruloXx/fps-limit-dry
centralized configuration system for lsfg-vk params
Diffstat (limited to 'src/components/UsageInstructions.tsx')
-rw-r--r--src/components/UsageInstructions.tsx30
1 files changed, 10 insertions, 20 deletions
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%";