diff options
| author | Grimbakor <davidstur@gmail.com> | 2025-01-30 17:11:32 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-30 12:11:32 -0500 |
| commit | 00d16976e6ff5257066c24fe819d479f324db215 (patch) | |
| tree | c5587c9c9e52f90fef22d050543162111bbacb14 /src/index.tsx | |
| parent | 13de57fb692ac9f15646ece6d25a33fe936beb4f (diff) | |
| download | Decky-Framegen-00d16976e6ff5257066c24fe819d479f324db215.tar.gz Decky-Framegen-00d16976e6ff5257066c24fe819d479f324db215.zip | |
* Move assets/ to defaults/assets so .vscode/build.sh and decky-cli packages correctly (#28)v0.5.0-Bundled
* Changed all paths to use environment variables from decky as base paths
* Remove alwaysRender from front-end so setInterval does not run in the
background during a game session
Diffstat (limited to 'src/index.tsx')
| -rwxr-xr-x | src/index.tsx | 72 |
1 files changed, 2 insertions, 70 deletions
diff --git a/src/index.tsx b/src/index.tsx index 7152951..851e003 100755 --- a/src/index.tsx +++ b/src/index.tsx @@ -162,74 +162,6 @@ function FGModInstallerSection() { ); } -// function MainRunningApp() { -// const mainRunningApp = Router.MainRunningApp; -// const [result, setResult] = useState<string | null>(null); -// const [isPatched, setIsPatched] = useState<boolean>(false); - -// const checkLaunchOptions = async () => { -// if (mainRunningApp) { -// try { -// const currentOptions = await SteamClient.Apps.GetLaunchOptionsForApp(mainRunningApp.appid); -// setIsPatched(currentOptions.includes('~/fgmod/fgmod %COMMAND%')); -// } catch (error) { -// console.error('Error checking launch options:', error); -// } -// } -// }; - -// useEffect(() => { -// if (mainRunningApp) { -// checkLaunchOptions(); -// } -// }, [mainRunningApp]); - -// const handleSetLaunchOptions = async () => { -// if (mainRunningApp) { -// try { -// if (isPatched) { -// await SteamClient.Apps.SetAppLaunchOptions(mainRunningApp.appid, ''); -// setResult(`Launch options cleared successfully. Restart the game to restore DLSS default files`); -// } else { -// await SteamClient.Apps.SetAppLaunchOptions(mainRunningApp.appid, '~/fgmod/fgmod %COMMAND%'); -// setResult(`Launch options set successfully, restart the game to use FSR upscaling and frame gen via DLSS options.`); -// } -// setIsPatched(!isPatched); -// } catch (error) { -// if (error instanceof Error) { -// setResult(`Error setting launch options: ${error.message}`); -// } else { -// setResult('Error setting launch options'); -// } -// } -// } -// }; - -// return ( -// <PanelSection title="Game Patcher"> -// <PanelSectionRow> -// <div> -// {mainRunningApp ? ( -// <> -// <span>{isPatched ? `UnPatch: ${mainRunningApp.display_name}` : `Patch: ${mainRunningApp.display_name}`}</span> -// <ButtonItem layout="below" onClick={handleSetLaunchOptions}> -// {isPatched ? `UnPatch: ${mainRunningApp.display_name}` : `Patch: ${mainRunningApp.display_name}`} -// </ButtonItem> -// </> -// ) : ( -// <span>No game is currently open.</span> -// )} -// </div> -// </PanelSectionRow> -// {result && ( -// <PanelSectionRow> -// <div>{result}</div> -// </PanelSectionRow> -// )} -// </PanelSection> -// ); -// } - function InstalledGamesSection() { const [games, setGames] = useState<{ appid: number; name: string }[]>([]); const [clickedGame, setClickedGame] = useState<{ appid: number; name: string } | null>(null); @@ -319,7 +251,7 @@ function InstalledGamesSection() { export default definePlugin(() => ({ name: "Framegen Plugin", titleView: <div>Decky Framegen</div>, - alwaysRender: true, + alwaysRender: false, content: ( <> <FGModInstallerSection /> @@ -339,4 +271,4 @@ function MainContent() { {} </> ); -}
\ No newline at end of file +} |
