summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorxXJSONDeruloXx <danielhimebauch@gmail.com>2025-07-17 23:23:03 -0400
committerxXJSONDeruloXx <danielhimebauch@gmail.com>2025-07-17 23:23:03 -0400
commit0670041467ca5625d93e3e4dbc2f738da24d88b4 (patch)
treee4a0bdd982856c489899cd30cc8487b3430ae6c2 /src
parentf2870ff308131a0a4c970edf36bb88aac10a6175 (diff)
downloaddecky-lsfg-vk-0670041467ca5625d93e3e4dbc2f738da24d88b4.tar.gz
decky-lsfg-vk-0670041467ca5625d93e3e4dbc2f738da24d88b4.zip
add experimental toggles
Diffstat (limited to 'src')
-rw-r--r--src/api/lsfgApi.ts4
-rw-r--r--src/components/ConfigurationSection.tsx46
-rw-r--r--src/components/Content.tsx4
-rw-r--r--src/components/UsageInstructions.tsx4
-rw-r--r--src/components/index.ts2
-rw-r--r--src/config/configSchema.ts16
6 files changed, 69 insertions, 7 deletions
diff --git a/src/api/lsfgApi.ts b/src/api/lsfgApi.ts
index 8cdf6f0..7d37f4e 100644
--- a/src/api/lsfgApi.ts
+++ b/src/api/lsfgApi.ts
@@ -76,14 +76,14 @@ export const getConfigSchema = callable<[], ConfigSchemaResult>("get_config_sche
// Updated config function using centralized configuration
export const updateLsfgConfig = callable<
- [boolean, string, number, number, boolean, boolean],
+ [boolean, string, number, number, boolean, boolean, string, number],
ConfigUpdateResult
>("update_lsfg_config");
// Helper function to create config update from configuration object
export const updateLsfgConfigFromObject = async (config: ConfigurationData): Promise<ConfigUpdateResult> => {
const args = ConfigurationManager.createArgsFromConfig(config);
- return updateLsfgConfig(...args as [boolean, string, number, number, boolean, boolean]);
+ return updateLsfgConfig(...args as [boolean, string, number, number, boolean, boolean, string, number]);
};
// Self-updater API functions
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)}
/>
</PanelSectionRow>
+
+ {/* Experimental Features Section */}
+ <PanelSectionRow>
+ <div
+ style={{
+ fontSize: "14px",
+ fontWeight: "bold",
+ marginTop: "24px",
+ marginBottom: "8px",
+ borderBottom: "1px solid rgba(255, 165, 0, 0.4)",
+ paddingBottom: "4px",
+ color: "rgba(255, 165, 0, 0.9)"
+ }}
+ >
+ ⚠️ Experimental Features
+ </div>
+ </PanelSectionRow>
+
+ <PanelSectionRow>
+ <Dropdown
+ menuLabel="Present Mode"
+ selectedOption={config.experimental_present_mode}
+ onChange={(value) => 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" }
+ ]}
+ />
+ </PanelSectionRow>
+
+ <PanelSectionRow>
+ <SliderField
+ label={`FPS Limit${config.experimental_fps_limit > 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)}
+ />
+ </PanelSectionRow>
</>
);
}
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() {
/>
)}
- <UsageInstructions config={config} />
+ {/* <UsageInstructions config={config} /> */}
<WikiButton />
<ClipboardButton />
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"}`}
</div>
</PanelSectionRow>
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";
diff --git a/src/config/configSchema.ts b/src/config/configSchema.ts
index 6dc8687..9b6fc41 100644
--- a/src/config/configSchema.ts
+++ b/src/config/configSchema.ts
@@ -63,6 +63,20 @@ export const CONFIG_SCHEMA: Record<string, ConfigField> = {
fieldType: ConfigFieldType.BOOLEAN,
default: false,
description: "enable hdr in games that support it"
+ },
+
+ experimental_present_mode: {
+ name: "experimental_present_mode",
+ fieldType: ConfigFieldType.STRING,
+ default: "",
+ description: "experimental: override vulkan present mode (empty/fifo/vsync/mailbox/immediate)"
+ },
+
+ experimental_fps_limit: {
+ name: "experimental_fps_limit",
+ fieldType: ConfigFieldType.INTEGER,
+ default: 0,
+ description: "experimental: base framerate cap for dxvk games, before frame multiplier (0 = disabled)"
}
};
@@ -74,6 +88,8 @@ export interface ConfigurationData {
flow_scale: number;
performance_mode: boolean;
hdr_mode: boolean;
+ experimental_present_mode: string;
+ experimental_fps_limit: number;
}
// Centralized configuration manager