diff options
| author | xXJsonDeruloXx <danielhimebauch@gmail.com> | 2026-08-01 14:47:18 -0400 |
|---|---|---|
| committer | xXJsonDeruloXx <danielhimebauch@gmail.com> | 2026-08-01 14:47:18 -0400 |
| commit | 02521a797e195b331af1778cd7bc854d3a396ead (patch) | |
| tree | 63c48b246d9db2f6ab0140259d7fb8b15f2e085b /src/components/CustomPathOverride.tsx | |
| parent | 96eb17b0a9f2cfd2b00ad082bef893f4efc229f7 (diff) | |
| download | Decky-Framegen-02521a797e195b331af1778cd7bc854d3a396ead.tar.gz Decky-Framegen-02521a797e195b331af1778cd7bc854d3a396ead.zip | |
refactor patch management and add ownership safeguards
Diffstat (limited to 'src/components/CustomPathOverride.tsx')
| -rw-r--r-- | src/components/CustomPathOverride.tsx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/components/CustomPathOverride.tsx b/src/components/CustomPathOverride.tsx index af47735..fb7cd05 100644 --- a/src/components/CustomPathOverride.tsx +++ b/src/components/CustomPathOverride.tsx @@ -38,6 +38,7 @@ interface ManualPatchControlsProps { onManualModeChange?: (enabled: boolean) => void; dllName: string; fsr4Variant: string; + framegenBackend: string; } interface PickerState { @@ -58,7 +59,7 @@ const formatResultMessage = (result: ApiResponse | null) => { return result.message || result.output || "Operation failed."; }; -export const ManualPatchControls = ({ isAvailable, onManualModeChange, dllName, fsr4Variant }: ManualPatchControlsProps) => { +export const ManualPatchControls = ({ isAvailable, onManualModeChange, dllName, fsr4Variant, framegenBackend }: ManualPatchControlsProps) => { const [isEnabled, setEnabled] = useState(false); const [defaults, setDefaults] = useState<PathDefaults>(INITIAL_DEFAULTS); const [pickerState, setPickerState] = useState<PickerState>(INITIAL_PICKER_STATE); @@ -160,14 +161,14 @@ export const ManualPatchControls = ({ isAvailable, onManualModeChange, dllName, if (!selectedPath) return; const setBusy = action === "patch" ? setIsPatching : setIsUnpatching; - setLastOperation(action); + setLastOperation(action); setBusy(true); setOperationResult(null); try { const response = action === "patch" - ? await runManualPatch(selectedPath, dllName, fsr4Variant) + ? await runManualPatch(selectedPath, dllName, fsr4Variant, framegenBackend) : await runManualUnpatch(selectedPath); setOperationResult(response ?? { status: "error", message: "No response from backend." }); } catch (err) { @@ -179,7 +180,7 @@ export const ManualPatchControls = ({ isAvailable, onManualModeChange, dllName, setBusy(false); } }, - [selectedPath, dllName, fsr4Variant] + [selectedPath, dllName, fsr4Variant, framegenBackend] ); const handleToggle = (value: boolean) => { @@ -304,4 +305,4 @@ export const ManualPatchControls = ({ isAvailable, onManualModeChange, dllName, )} </> ); -};
\ No newline at end of file +}; |
