summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--package.json2
-rw-r--r--src/components/ConfigurationSection.tsx23
2 files changed, 22 insertions, 3 deletions
diff --git a/package.json b/package.json
index 0ea5c52..9f2b7dc 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "decky-lossless-scaling-vk",
- "version": "0.7.0",
+ "version": "0.7.1",
"description": "Use Lossless Scaling on the Steam Deck using the lsfg-vk vulkan layer",
"type": "module",
"scripts": {
diff --git a/src/components/ConfigurationSection.tsx b/src/components/ConfigurationSection.tsx
index a1aca09..57c75ad 100644
--- a/src/components/ConfigurationSection.tsx
+++ b/src/components/ConfigurationSection.tsx
@@ -1,5 +1,5 @@
import { PanelSectionRow, ToggleField, SliderField, ButtonItem } from "@decky/ui";
-import { useState } from "react";
+import { useState, useEffect } from "react";
import { RiArrowDownSFill, RiArrowUpSFill } from "react-icons/ri";
import { ConfigurationData } from "../config/configSchema";
import { FpsMultiplierControl } from "./FpsMultiplierControl";
@@ -14,11 +14,30 @@ interface ConfigurationSectionProps {
onConfigChange: (fieldName: keyof ConfigurationData, value: boolean | number | string) => Promise<void>;
}
+const WORKAROUNDS_COLLAPSED_KEY = 'lsfg-workarounds-collapsed';
+
export function ConfigurationSection({
config,
onConfigChange
}: ConfigurationSectionProps) {
- const [workaroundsCollapsed, setWorkaroundsCollapsed] = useState(true);
+ // Initialize with localStorage value, fallback to true if not found
+ const [workaroundsCollapsed, setWorkaroundsCollapsed] = useState(() => {
+ try {
+ const saved = localStorage.getItem(WORKAROUNDS_COLLAPSED_KEY);
+ return saved !== null ? JSON.parse(saved) : true;
+ } catch {
+ return true;
+ }
+ });
+
+ // Persist workarounds collapse state to localStorage
+ useEffect(() => {
+ try {
+ localStorage.setItem(WORKAROUNDS_COLLAPSED_KEY, JSON.stringify(workaroundsCollapsed));
+ } catch (error) {
+ console.warn('Failed to save workarounds collapse state:', error);
+ }
+ }, [workaroundsCollapsed]);
return (
<>