import { useEffect, useState } from "react"; import { PanelSectionRow } from "@decky/ui"; import { getLaunchOption } from "../api/lsfgApi"; export function UsageInstructions() { const [launchOption, setLaunchOption] = useState("~/lsfg %command%"); const [launchExplanation, setLaunchExplanation] = useState( "The LSFG wrapper configures frame generation before launching the game." ); useEffect(() => { let active = true; getLaunchOption() .then((result) => { if (!active) return; if (result.launch_option) setLaunchOption(result.launch_option); if (result.explanation) setLaunchExplanation(result.explanation); }) .catch(() => { // Keep the standard launch option visible if the backend is unavailable. }); return () => { active = false; }; }, []); return ( <> Usage Instructions Click "Copy Launch Option" button, then paste it into your Steam game's launch options to enable frame generation. {launchOption} {launchExplanation} The configuration is stored in ~/.config/lsfg-vk/conf.toml and hot-reloads while games are running. > ); }