summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--package.json6
-rw-r--r--src/components/ConfigurationSection.tsx27
-rw-r--r--src/components/FpsMultiplierControl.tsx72
-rw-r--r--src/components/index.ts1
4 files changed, 81 insertions, 25 deletions
diff --git a/package.json b/package.json
index ee18530..c2945b4 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "decky-lossless-scaling-vk",
- "version": "0.6.10",
+ "version": "0.6.11",
"description": "Use Lossless Scaling on the Steam Deck using the lsfg-vk vulkan layer",
"type": "module",
"scripts": {
@@ -46,8 +46,8 @@
"remote_binary": [
{
"name": "lsfg-vk_archlinux.zip",
- "url": "https://github.com/xXJSONDeruloXx/lsfg-vk/releases/download/upstream-16389394927/lsfg-vk_archlinux.zip",
- "sha256hash": "3ef1e2e89652f83089e326c67a7dbf586bcdb8cf5c427f300abd8887d733d6fa"
+ "url": "https://github.com/xXJSONDeruloXx/lsfg-vk/releases/download/upstream-16403902734/lsfg-vk_archlinux.zip",
+ "sha256hash": "220628261bfea8c81661d37fd0069a02214e85dbf32e28dcb08c5f55a6193075"
}
],
diff --git a/src/components/ConfigurationSection.tsx b/src/components/ConfigurationSection.tsx
index c0b67fd..778ebc8 100644
--- a/src/components/ConfigurationSection.tsx
+++ b/src/components/ConfigurationSection.tsx
@@ -1,7 +1,8 @@
import { PanelSectionRow, ToggleField, SliderField, DropdownItem } from "@decky/ui";
import { ConfigurationData } from "../config/configSchema";
+import { FpsMultiplierControl } from "./FpsMultiplierControl";
import {
- MULTIPLIER, FLOW_SCALE, PERFORMANCE_MODE, HDR_MODE,
+ FLOW_SCALE, PERFORMANCE_MODE, HDR_MODE,
EXPERIMENTAL_PRESENT_MODE, DXVK_FRAME_RATE, DISABLE_STEAMDECK_MODE,
MANGOHUD_WORKAROUND, DISABLE_VKBASALT
} from "../config/generatedConfigSchema";
@@ -23,7 +24,7 @@ export function ConfigurationSection({
fontSize: "14px",
fontWeight: "bold",
marginTop: "16px",
- marginBottom: "8px",
+ marginBottom: "16px",
borderBottom: "1px solid rgba(255, 255, 255, 0.2)",
paddingBottom: "4px",
color: "white"
@@ -33,26 +34,8 @@ export function ConfigurationSection({
</div>
</PanelSectionRow>
- <PanelSectionRow>
- <SliderField
- label="FPS Multiplier"
- description="Traditional FPS multiplier value"
- value={config.multiplier}
- min={1}
- max={4}
- step={1}
- notchCount={4}
- notchLabels={[
- { notchIndex: 0, label: "OFF", value: 1 },
- { notchIndex: 1, label: "2X", value: 2 },
- { notchIndex: 2, label: "3X", value: 3 },
- { notchIndex: 3, label: "4X", value: 4 }
- ]}
- showValue={false}
- notchTicksVisible={true}
- onChange={(value) => onConfigChange(MULTIPLIER, value)}
- />
- </PanelSectionRow>
+ {/* FPS Multiplier */}
+ <FpsMultiplierControl config={config} onConfigChange={onConfigChange} />
<PanelSectionRow>
<SliderField
diff --git a/src/components/FpsMultiplierControl.tsx b/src/components/FpsMultiplierControl.tsx
new file mode 100644
index 0000000..456a7b4
--- /dev/null
+++ b/src/components/FpsMultiplierControl.tsx
@@ -0,0 +1,72 @@
+import { PanelSectionRow, DialogButton, Focusable } from "@decky/ui";
+import { ConfigurationData } from "../config/configSchema";
+import { MULTIPLIER } from "../config/generatedConfigSchema";
+
+interface FpsMultiplierControlProps {
+ config: ConfigurationData;
+ onConfigChange: (fieldName: keyof ConfigurationData, value: boolean | number | string) => Promise<void>;
+}
+
+export function FpsMultiplierControl({
+ config,
+ onConfigChange
+}: FpsMultiplierControlProps) {
+ return (
+ <PanelSectionRow>
+ <Focusable
+ style={{
+ marginTop: "10px",
+ marginBottom: "10px",
+ display: "flex",
+ justifyContent: "center",
+ alignItems: "center"
+ }}
+ flow-children="horizontal"
+ >
+ <DialogButton
+ style={{
+ marginLeft: "0px",
+ height: "30px",
+ display: "flex",
+ alignItems: "center",
+ justifyContent: "center",
+ padding: "5px 0px 0px 0px",
+ minWidth: "40px",
+ }}
+ onClick={() => onConfigChange(MULTIPLIER, Math.max(1, config.multiplier - 1))}
+ disabled={config.multiplier <= 1}
+ >
+ −
+ </DialogButton>
+ <div
+ style={{
+ marginLeft: "20px",
+ marginRight: "20px",
+ fontSize: "16px",
+ fontWeight: "bold",
+ color: "white",
+ minWidth: "60px",
+ textAlign: "center"
+ }}
+ >
+ {config.multiplier < 2 ? "OFF" : `${config.multiplier}X`}
+ </div>
+ <DialogButton
+ style={{
+ marginLeft: "0px",
+ height: "30px",
+ display: "flex",
+ alignItems: "center",
+ justifyContent: "center",
+ padding: "5px 0px 0px 0px",
+ minWidth: "40px",
+ }}
+ onClick={() => onConfigChange(MULTIPLIER, Math.min(4, config.multiplier + 1))}
+ disabled={config.multiplier >= 4}
+ >
+ +
+ </DialogButton>
+ </Focusable>
+ </PanelSectionRow>
+ );
+}
diff --git a/src/components/index.ts b/src/components/index.ts
index e4568f1..4c94958 100644
--- a/src/components/index.ts
+++ b/src/components/index.ts
@@ -2,6 +2,7 @@ export { Content } from "./Content";
export { StatusDisplay } from "./StatusDisplay";
export { InstallationButton } from "./InstallationButton";
export { ConfigurationSection } from "./ConfigurationSection";
+export { FpsMultiplierControl } from "./FpsMultiplierControl";
export { UsageInstructions } from "./UsageInstructions";
export { WikiButton } from "./WikiButton";
export { SmartClipboardButton } from "./SmartClipboardButton";