diff options
| author | Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com> | 2026-04-05 20:29:56 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-05 20:29:56 -0400 |
| commit | 47e7e2610b44809e13bea6bad7f1345fe6f58fa3 (patch) | |
| tree | 669108810d1e8cae084dc658f74c740366bd464d /src/components/OptiScalerControls.tsx | |
| parent | ef469a8036e3b3f129a753dad4cf04fad3ca92f7 (diff) | |
| parent | b8eed9a4f3d98d887a9cc8f18b821d6a2af4598d (diff) | |
| download | Decky-Framegen-47e7e2610b44809e13bea6bad7f1345fe6f58fa3.tar.gz Decky-Framegen-47e7e2610b44809e13bea6bad7f1345fe6f58fa3.zip | |
Opti 090 final
Diffstat (limited to 'src/components/OptiScalerControls.tsx')
| -rw-r--r-- | src/components/OptiScalerControls.tsx | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/src/components/OptiScalerControls.tsx b/src/components/OptiScalerControls.tsx index 468683c..f88e8f9 100644 --- a/src/components/OptiScalerControls.tsx +++ b/src/components/OptiScalerControls.tsx @@ -1,9 +1,9 @@ import { useState, useEffect } from "react"; -import { PanelSection } from "@decky/ui"; +import { DropdownItem, PanelSection, PanelSectionRow } from "@decky/ui"; import { runInstallFGMod, runUninstallFGMod } from "../api"; import { OperationResult } from "./ResultDisplay"; import { createAutoCleanupTimer } from "../utils"; -import { TIMEOUTS } from "../utils/constants"; +import { TIMEOUTS, PROXY_DLL_OPTIONS, DEFAULT_PROXY_DLL } from "../utils/constants"; import { InstallationStatus } from "./InstallationStatus"; import { OptiScalerHeader } from "./OptiScalerHeader"; import { ClipboardCommands } from "./ClipboardCommands"; @@ -11,6 +11,7 @@ import { InstructionCard } from "./InstructionCard"; import { OptiScalerWiki } from "./OptiScalerWiki"; import { UninstallButton } from "./UninstallButton"; import { ManualPatchControls } from "./CustomPathOverride"; +import { SteamGamePatcher } from "./SteamGamePatcher"; interface OptiScalerControlsProps { pathExists: boolean | null; @@ -23,6 +24,7 @@ export function OptiScalerControls({ pathExists, setPathExists }: OptiScalerCont const [installResult, setInstallResult] = useState<OperationResult | null>(null); const [uninstallResult, setUninstallResult] = useState<OperationResult | null>(null); const [manualModeEnabled, setManualModeEnabled] = useState(false); + const [dllName, setDllName] = useState<string>(DEFAULT_PROXY_DLL); useEffect(() => { if (installResult) { return createAutoCleanupTimer(() => setInstallResult(null), TIMEOUTS.resultDisplay); @@ -76,18 +78,34 @@ export function OptiScalerControls({ pathExists, setPathExists }: OptiScalerCont /> <OptiScalerHeader pathExists={pathExists} /> - + + {pathExists === true && ( + <PanelSectionRow> + <DropdownItem + label="Proxy DLL name" + description={PROXY_DLL_OPTIONS.find((o) => o.value === dllName)?.hint} + menuLabel="Proxy DLL name" + selectedOption={dllName} + rgOptions={PROXY_DLL_OPTIONS.map((o) => ({ data: o.value, label: o.label }))} + onChange={(option) => setDllName(String(option.data))} + /> + </PanelSectionRow> + )} + + {pathExists === true && ( + <SteamGamePatcher dllName={dllName} /> + )} + + <ClipboardCommands pathExists={pathExists} dllName={dllName} /> + <ManualPatchControls isAvailable={pathExists === true} onManualModeChange={setManualModeEnabled} + dllName={dllName} /> {!manualModeEnabled && ( - <> - <ClipboardCommands pathExists={pathExists} /> - - <InstructionCard pathExists={pathExists} /> - </> + <InstructionCard pathExists={pathExists} /> )} <OptiScalerWiki pathExists={pathExists} /> |
