From 0670041467ca5625d93e3e4dbc2f738da24d88b4 Mon Sep 17 00:00:00 2001 From: xXJSONDeruloXx Date: Thu, 17 Jul 2025 23:23:03 -0400 Subject: add experimental toggles --- src/components/ConfigurationSection.tsx | 46 ++++++++++++++++++++++++++++++++- src/components/Content.tsx | 4 +-- src/components/UsageInstructions.tsx | 4 ++- src/components/index.ts | 2 +- 4 files changed, 51 insertions(+), 5 deletions(-) (limited to 'src/components') diff --git a/src/components/ConfigurationSection.tsx b/src/components/ConfigurationSection.tsx index deb8fba..76b9bc2 100644 --- a/src/components/ConfigurationSection.tsx +++ b/src/components/ConfigurationSection.tsx @@ -1,4 +1,4 @@ -import { PanelSectionRow, ToggleField, SliderField, TextField } from "@decky/ui"; +import { PanelSectionRow, ToggleField, SliderField, Dropdown } from "@decky/ui"; import { ConfigurationData } from "../config/configSchema"; interface ConfigurationSectionProps { @@ -93,6 +93,50 @@ export function ConfigurationSection({ onChange={(value) => onConfigChange('hdr_mode', value)} /> + + {/* Experimental Features Section */} + +
+ ⚠️ Experimental Features +
+
+ + + onConfigChange('experimental_present_mode', value.data)} + rgOptions={[ + { data: "", label: "Default (FIFO)" }, + { data: "fifo", label: "FIFO" }, + { data: "vsync", label: "VSync" }, + { data: "mailbox", label: "Mailbox" }, + { data: "immediate", label: "Immediate" } + ]} + /> + + + + 0 ? ` (${config.experimental_fps_limit} FPS)` : ' (Off)'}`} + description="Base framerate cap for DXVK games, before frame multiplier (0 = disabled)" + value={config.experimental_fps_limit} + min={0} + max={60} + step={1} + onChange={(value) => onConfigChange('experimental_fps_limit', value)} + /> + ); } diff --git a/src/components/Content.tsx b/src/components/Content.tsx index 613e722..ae64931 100644 --- a/src/components/Content.tsx +++ b/src/components/Content.tsx @@ -5,7 +5,7 @@ import { useInstallationActions } from "../hooks/useInstallationActions"; import { StatusDisplay } from "./StatusDisplay"; import { InstallationButton } from "./InstallationButton"; import { ConfigurationSection } from "./ConfigurationSection"; -import { UsageInstructions } from "./UsageInstructions"; +// import { UsageInstructions } from "./UsageInstructions"; import { WikiButton } from "./WikiButton"; import { ClipboardButton } from "./ClipboardButton"; import { PluginUpdateChecker } from "./PluginUpdateChecker"; @@ -74,7 +74,7 @@ export function Content() { /> )} - + {/* */} diff --git a/src/components/UsageInstructions.tsx b/src/components/UsageInstructions.tsx index ac721c7..d156f9d 100644 --- a/src/components/UsageInstructions.tsx +++ b/src/components/UsageInstructions.tsx @@ -54,7 +54,9 @@ export function UsageInstructions({ config }: UsageInstructionsProps) { • Multiplier: ${config.multiplier}x • Flow Scale: ${Math.round(config.flow_scale * 100)}% • Performance Mode: ${config.performance_mode ? "Yes" : "No"} -• HDR Mode: ${config.hdr_mode ? "Yes" : "No"}`} +• HDR Mode: ${config.hdr_mode ? "Yes" : "No"} +• Present Mode: ${config.experimental_present_mode || "Default (FIFO)"} +• FPS Limit: ${config.experimental_fps_limit > 0 ? `${config.experimental_fps_limit} FPS` : "Off"}`} diff --git a/src/components/index.ts b/src/components/index.ts index d26159d..ab7a117 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -2,7 +2,7 @@ export { Content } from "./Content"; export { StatusDisplay } from "./StatusDisplay"; export { InstallationButton } from "./InstallationButton"; export { ConfigurationSection } from "./ConfigurationSection"; -export { UsageInstructions } from "./UsageInstructions"; +// export { UsageInstructions } from "./UsageInstructions"; export { WikiButton } from "./WikiButton"; export { ClipboardButton } from "./ClipboardButton"; export { PluginUpdateChecker } from "./PluginUpdateChecker"; -- cgit v1.2.3