From 4390d600ffd35184c4c30bc64480f58e468627de Mon Sep 17 00:00:00 2001
From: xXJSONDeruloXx <danielhimebauch@gmail.com>
Date: Thu, 30 Jul 2026 16:26:27 -0400
Subject: feat: migrate Decky plugin to lsfg-vk v2

---
 src/components/ConfigurationSection.tsx | 68 +++++++++++++++++++++++----------
 1 file changed, 48 insertions(+), 20 deletions(-)

(limited to 'src/components/ConfigurationSection.tsx')

diff --git a/src/components/ConfigurationSection.tsx b/src/components/ConfigurationSection.tsx
index 0734297..7143bb1 100644
--- a/src/components/ConfigurationSection.tsx
+++ b/src/components/ConfigurationSection.tsx
@@ -1,10 +1,10 @@
-import { PanelSectionRow, ToggleField, SliderField, ButtonItem } from "@decky/ui";
+import { PanelSectionRow, ToggleField, SliderField, ButtonItem, TextField } from "@decky/ui";
 import { useState, useEffect } from "react";
 import { RiArrowDownSFill, RiArrowUpSFill } from "react-icons/ri";
 import { ConfigurationData } from "../config/configSchema";
 import {
-  FLOW_SCALE, PERFORMANCE_MODE, HDR_MODE,
-  EXPERIMENTAL_PRESENT_MODE, DXVK_FRAME_RATE, DISABLE_STEAMDECK_MODE,
+  ACTIVE_IN, ALLOW_FP16, DISABLE_LSFGVK, DLL, FLOW_SCALE, GPU,
+  PERFORMANCE_MODE, DXVK_FRAME_RATE, DISABLE_STEAMDECK_MODE,
   MANGOHUD_WORKAROUND, DISABLE_VKBASALT, FORCE_ENABLE_VKBASALT, ENABLE_WSI, ENABLE_ZINK
 } from "../config/generatedConfigSchema";
 
@@ -113,6 +113,15 @@ export function ConfigurationSection({
 
       {!configCollapsed && (
         <>
+          <PanelSectionRow>
+            <TextField
+              label="Lossless.dll Path"
+              description="Optional full path to Lossless.dll. Leave blank for lsfg-vk automatic discovery."
+              value={config.dll}
+              onChange={(event) => onConfigChange(DLL, event.currentTarget.value)}
+            />
+          </PanelSectionRow>
+
           <PanelSectionRow>
             <SliderField
               label={`Flow Scale (${Math.round(config.flow_scale * 100)}%)`}
@@ -125,6 +134,42 @@ export function ConfigurationSection({
             />
           </PanelSectionRow>
 
+          <PanelSectionRow>
+            <ToggleField
+              label="Disable Frame Generation"
+              description="Disables lsfg-vk on the next game launch. Requires a game restart."
+              checked={config.disable_lsfgvk}
+              onChange={(value) => onConfigChange(DISABLE_LSFGVK, value)}
+            />
+          </PanelSectionRow>
+
+          <PanelSectionRow>
+            <ToggleField
+              label="Allow FP16"
+              description="Improves performance on AMD; disable for older NVIDIA GPUs."
+              checked={config.allow_fp16}
+              onChange={(value) => onConfigChange(ALLOW_FP16, value)}
+            />
+          </PanelSectionRow>
+
+          <PanelSectionRow>
+            <TextField
+              label="GPU"
+              description="Optional GPU name, vendor:device ID, or PCI bus ID."
+              value={config.gpu}
+              onChange={(event) => onConfigChange(GPU, event.currentTarget.value)}
+            />
+          </PanelSectionRow>
+
+          <PanelSectionRow>
+            <TextField
+              label="Active In"
+              description="Executable/process names separated by commas. When set, lsfg-vk matches profiles automatically."
+              value={config.active_in}
+              onChange={(event) => onConfigChange(ACTIVE_IN, event.currentTarget.value)}
+            />
+          </PanelSectionRow>
+
           <PanelSectionRow>
             <SliderField
               label={`Base FPS Cap${config.dxvk_frame_rate > 0 ? ` (${config.dxvk_frame_rate} FPS)` : " (Off)"}`}
@@ -137,15 +182,6 @@ export function ConfigurationSection({
             />
           </PanelSectionRow>
 
-          <PanelSectionRow>
-            <ToggleField
-              label={`Present Mode (${(config.experimental_present_mode || "fifo") === "fifo" ? "FIFO - VSync" : "Mailbox"})`}
-              description="Toggle between FIFO - VSync (default) and Mailbox presentation modes for better performance or compatibility"
-              checked={(config.experimental_present_mode || "fifo") === "fifo"}
-              onChange={(value) => onConfigChange(EXPERIMENTAL_PRESENT_MODE, value ? "fifo" : "mailbox")}
-            />
-          </PanelSectionRow>
-
           <PanelSectionRow>
             <ToggleField
               label="Performance Mode"
@@ -155,14 +191,6 @@ export function ConfigurationSection({
             />
           </PanelSectionRow>
 
-          <PanelSectionRow>
-            <ToggleField
-              label="HDR Mode"
-              description="Enables HDR mode (only for games that support HDR)"
-              checked={config.hdr_mode}
-              onChange={(value) => onConfigChange(HDR_MODE, value)}
-            />
-          </PanelSectionRow>
         </>
       )}
 
-- 
cgit v1.2.3

