From c02343e68874efd57c2e312cb6b7e4f02222e43a Mon Sep 17 00:00:00 2001 From: xXJSONDeruloXx Date: Tue, 22 Jul 2025 11:11:44 -0400 Subject: add workaround env vars, rm old tests --- src/components/ConfigurationSection.tsx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/components/ConfigurationSection.tsx') diff --git a/src/components/ConfigurationSection.tsx b/src/components/ConfigurationSection.tsx index 59ad880..26099e7 100644 --- a/src/components/ConfigurationSection.tsx +++ b/src/components/ConfigurationSection.tsx @@ -154,6 +154,24 @@ export function ConfigurationSection({ onChange={(value) => onConfigChange('disable_steamdeck_mode', value)} /> + + + onConfigChange('mangohud_workaround', value)} + /> + + + + onConfigChange('disable_vkbasalt', value)} + /> + ); } -- cgit v1.2.3 From dfe4c033dd1922a63c8393ab467e9aa58fa757e4 Mon Sep 17 00:00:00 2001 From: xXJSONDeruloXx Date: Tue, 22 Jul 2025 11:41:49 -0400 Subject: refactor: update configuration handling to use object-based API --- src/components/ConfigurationSection.tsx | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) (limited to 'src/components/ConfigurationSection.tsx') diff --git a/src/components/ConfigurationSection.tsx b/src/components/ConfigurationSection.tsx index 26099e7..1c0d2b2 100644 --- a/src/components/ConfigurationSection.tsx +++ b/src/components/ConfigurationSection.tsx @@ -112,16 +112,26 @@ export function ConfigurationSection({
+ Environment Variables +
+
- Environment Variables (Requires re-launch) + Must be toggled before game start or restart game to take effect
-- cgit v1.2.3 From f8139896f2077a95a78a54c818637f78dd102de8 Mon Sep 17 00:00:00 2001 From: xXJSONDeruloXx Date: Tue, 22 Jul 2025 12:11:53 -0400 Subject: consolidate toml and script values --- src/components/ConfigurationSection.tsx | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'src/components/ConfigurationSection.tsx') diff --git a/src/components/ConfigurationSection.tsx b/src/components/ConfigurationSection.tsx index 1c0d2b2..3f15bac 100644 --- a/src/components/ConfigurationSection.tsx +++ b/src/components/ConfigurationSection.tsx @@ -182,6 +182,38 @@ export function ConfigurationSection({ onChange={(value) => onConfigChange('disable_vkbasalt', value)} /> + + + onConfigChange('foobar_toggle', value)} + /> + + + +
+
Test Config Only Field
+ onConfigChange('test_config_only', e.target.value)} + placeholder="Enter test value" + style={{ + width: "100%", + padding: "8px", + borderRadius: "4px", + border: "1px solid #4c4c4c", + backgroundColor: "#2d2d2d", + color: "#ffffff" + }} + /> +
+ Test TOML-only configuration field (not in script) +
+
+
); } -- cgit v1.2.3 From f8c09209513507ad9af7822c32119cf6d6fae0ac Mon Sep 17 00:00:00 2001 From: xXJSONDeruloXx Date: Tue, 22 Jul 2025 12:40:23 -0400 Subject: rm test config options --- src/components/ConfigurationSection.tsx | 32 -------------------------------- 1 file changed, 32 deletions(-) (limited to 'src/components/ConfigurationSection.tsx') diff --git a/src/components/ConfigurationSection.tsx b/src/components/ConfigurationSection.tsx index 3f15bac..1c0d2b2 100644 --- a/src/components/ConfigurationSection.tsx +++ b/src/components/ConfigurationSection.tsx @@ -182,38 +182,6 @@ export function ConfigurationSection({ onChange={(value) => onConfigChange('disable_vkbasalt', value)} /> - - - onConfigChange('foobar_toggle', value)} - /> - - - -
-
Test Config Only Field
- onConfigChange('test_config_only', e.target.value)} - placeholder="Enter test value" - style={{ - width: "100%", - padding: "8px", - borderRadius: "4px", - border: "1px solid #4c4c4c", - backgroundColor: "#2d2d2d", - color: "#ffffff" - }} - /> -
- Test TOML-only configuration field (not in script) -
-
-
); } -- cgit v1.2.3 From d063284dea10e82a23c2c332ecd4901d7254171b Mon Sep 17 00:00:00 2001 From: xXJSONDeruloXx Date: Tue, 22 Jul 2025 13:23:25 -0400 Subject: use generated kwargs and config in more hardcoded places --- src/components/ConfigurationSection.tsx | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'src/components/ConfigurationSection.tsx') diff --git a/src/components/ConfigurationSection.tsx b/src/components/ConfigurationSection.tsx index 1c0d2b2..c0b67fd 100644 --- a/src/components/ConfigurationSection.tsx +++ b/src/components/ConfigurationSection.tsx @@ -1,5 +1,10 @@ import { PanelSectionRow, ToggleField, SliderField, DropdownItem } from "@decky/ui"; import { ConfigurationData } from "../config/configSchema"; +import { + MULTIPLIER, FLOW_SCALE, PERFORMANCE_MODE, HDR_MODE, + EXPERIMENTAL_PRESENT_MODE, DXVK_FRAME_RATE, DISABLE_STEAMDECK_MODE, + MANGOHUD_WORKAROUND, DISABLE_VKBASALT +} from "../config/generatedConfigSchema"; interface ConfigurationSectionProps { config: ConfigurationData; @@ -45,7 +50,7 @@ export function ConfigurationSection({ ]} showValue={false} notchTicksVisible={true} - onChange={(value) => onConfigChange('multiplier', value)} + onChange={(value) => onConfigChange(MULTIPLIER, value)} /> @@ -57,7 +62,7 @@ export function ConfigurationSection({ min={0.25} max={1.0} step={0.01} - onChange={(value) => onConfigChange('flow_scale', value)} + onChange={(value) => onConfigChange(FLOW_SCALE, value)} /> @@ -66,7 +71,7 @@ export function ConfigurationSection({ label="Performance Mode" description="Uses a lighter model for FG (Recommended for most games)" checked={config.performance_mode} - onChange={(value) => onConfigChange('performance_mode', value)} + onChange={(value) => onConfigChange(PERFORMANCE_MODE, value)} /> @@ -75,7 +80,7 @@ export function ConfigurationSection({ label="HDR Mode" description="Enables HDR mode (only for games that support HDR)" checked={config.hdr_mode} - onChange={(value) => onConfigChange('hdr_mode', value)} + onChange={(value) => onConfigChange(HDR_MODE, value)} /> @@ -101,7 +106,7 @@ export function ConfigurationSection({ description="Select a specific Vulkan presentation mode for better performance or compatibility (May cause crashes)" menuLabel="Select presentation mode" selectedOption={config.experimental_present_mode || "fifo"} - onChange={(value) => onConfigChange('experimental_present_mode', value.data)} + onChange={(value) => onConfigChange(EXPERIMENTAL_PRESENT_MODE, value.data)} rgOptions={[ { data: "fifo", label: "FIFO (VSync) - Default" }, { data: "mailbox", label: "Mailbox" } @@ -143,7 +148,7 @@ export function ConfigurationSection({ min={0} max={60} step={1} - onChange={(value) => onConfigChange('dxvk_frame_rate', value)} + onChange={(value) => onConfigChange(DXVK_FRAME_RATE, value)} /> @@ -161,7 +166,7 @@ export function ConfigurationSection({ label="Disable Steam Deck Mode" description="Disables Steam Deck mode (Unlocks hidden settings in some games)" checked={config.disable_steamdeck_mode} - onChange={(value) => onConfigChange('disable_steamdeck_mode', value)} + onChange={(value) => onConfigChange(DISABLE_STEAMDECK_MODE, value)} /> @@ -170,7 +175,7 @@ export function ConfigurationSection({ label="MangoHud Workaround" description="Enables a transparent mangohud overlay, sometimes fixes issues with 2X multiplier in game mode" checked={config.mangohud_workaround} - onChange={(value) => onConfigChange('mangohud_workaround', value)} + onChange={(value) => onConfigChange(MANGOHUD_WORKAROUND, value)} /> @@ -179,7 +184,7 @@ export function ConfigurationSection({ label="Disable vkBasalt" description="Disables vkBasalt layer which can conflict with LSFG (Reshade, some Decky plugins)" checked={config.disable_vkbasalt} - onChange={(value) => onConfigChange('disable_vkbasalt', value)} + onChange={(value) => onConfigChange(DISABLE_VKBASALT, value)} /> -- cgit v1.2.3