diff options
Diffstat (limited to 'src/components/UsageInstructions.tsx')
| -rw-r--r-- | src/components/UsageInstructions.tsx | 151 |
1 files changed, 76 insertions, 75 deletions
diff --git a/src/components/UsageInstructions.tsx b/src/components/UsageInstructions.tsx index 727a0ab..8ac94d8 100644 --- a/src/components/UsageInstructions.tsx +++ b/src/components/UsageInstructions.tsx @@ -6,88 +6,89 @@ interface UsageInstructionsProps { } export function UsageInstructions({ config }: UsageInstructionsProps) { - // Build manual environment variables string based on current config - const buildManualEnvVars = (): string => { - const envVars: string[] = []; - - if (config.enable_lsfg) { - envVars.push("ENABLE_LSFG=1"); - } - - // Always include multiplier and flow_scale if LSFG is enabled, as they have defaults - if (config.enable_lsfg) { - envVars.push(`LSFG_MULTIPLIER=${config.multiplier}`); - envVars.push(`LSFG_FLOW_SCALE=${config.flow_scale}`); - } - - if (config.hdr) { - envVars.push("LSFG_HDR=1"); - } - - if (config.perf_mode) { - envVars.push("LSFG_PERF_MODE=1"); - } - - if (config.immediate_mode) { - envVars.push("MESA_VK_WSI_PRESENT_MODE=immediate"); - } - - if (config.disable_vkbasalt) { - envVars.push("DISABLE_VKBASALT=1"); - } - - if (config.frame_cap > 0) { - envVars.push(`DXVK_FRAME_RATE=${config.frame_cap}`); - } - - return envVars.length > 0 ? `${envVars.join(" ")} %command%` : "%command%"; - }; - return ( <> <PanelSectionRow> <div style={{ - fontSize: "13px", - marginTop: "12px", - padding: "8px", - backgroundColor: "rgba(255, 255, 255, 0.05)", - borderRadius: "4px" + fontSize: "14px", + fontWeight: "bold", + marginTop: "16px", + marginBottom: "8px", + borderBottom: "1px solid rgba(255, 255, 255, 0.2)", + paddingBottom: "4px" + }} + > + Usage Instructions + </div> + </PanelSectionRow> + + <PanelSectionRow> + <div + style={{ + fontSize: "12px", + lineHeight: "1.4", + opacity: "0.8", + whiteSpace: "pre-wrap" + }} + > + {config.enable + ? "Add the launch option below (or use \"Launch Option Clipboard\") to Steam games to activate frame generation." + : "LSFG is disabled. Enable it above and add the launch option to activate frame generation." + } + </div> + </PanelSectionRow> + + <PanelSectionRow> + <div + style={{ + fontSize: "12px", + lineHeight: "1.4", + opacity: "0.8", + backgroundColor: "rgba(255, 255, 255, 0.1)", + padding: "8px", + borderRadius: "4px", + fontFamily: "monospace", + marginTop: "8px", + marginBottom: "8px", + textAlign: "center" + }} + > + <strong>~/lsfg %command%</strong> + </div> + </PanelSectionRow> + + {/* <PanelSectionRow> + <div + style={{ + fontSize: "12px", + lineHeight: "1.4", + opacity: "0.8", + whiteSpace: "pre-wrap" + }} + > + {`Current Configuration: +• Enable: ${config.enable ? "Yes" : "No"} +• DLL Path: ${config.dll} +• Multiplier: ${config.multiplier}x +• Flow Scale: ${Math.round(config.flow_scale * 100)}% +• Performance Mode: ${config.performance_mode ? "Yes" : "No"} +• HDR Mode: ${config.hdr_mode ? "Yes" : "No"} +• Present Mode: ${config.experimental_present_mode || "Default (FIFO)"} +• FPS Limit: ${config.experimental_fps_limit > 0 ? `${config.experimental_fps_limit} FPS` : "Off"}`} + </div> + </PanelSectionRow> */} + + <PanelSectionRow> + <div + style={{ + fontSize: "11px", + lineHeight: "1.3", + opacity: "0.6", + marginTop: "8px" }} > - <div style={{ fontWeight: "bold", marginBottom: "6px" }}> - Usage Instructions: - </div> - <div style={{ marginBottom: "4px" }}> - Option 1: Use the lsfg script (recommended): - </div> - <div - style={{ - fontFamily: "monospace", - backgroundColor: "rgba(0, 0, 0, 0.3)", - padding: "4px", - borderRadius: "2px", - fontSize: "12px", - marginBottom: "6px" - }} - > - ~/lsfg %command% - </div> - <div style={{ marginBottom: "4px" }}> - Option 2: Manual environment variables: - </div> - <div - style={{ - fontFamily: "monospace", - backgroundColor: "rgba(0, 0, 0, 0.3)", - padding: "4px", - borderRadius: "2px", - fontSize: "12px", - marginBottom: "6px" - }} - > - {buildManualEnvVars()} - </div> +The configuration is stored in ~/.config/lsfg-vk/conf.toml and hot-reloads while games are running. </div> </PanelSectionRow> </> |
