fix(plugin): retry mangohudctl start logging until game launches

This commit is contained in:
2026-06-28 20:38:18 +08:00
parent 37cc24ff60
commit 928ec8ec9a
2 changed files with 25 additions and 3 deletions
+4 -1
View File
@@ -14,6 +14,7 @@ import {
readAndParseMangohudLog,
clearMangohudLog,
writeMangohudConfig,
startMangohudLogging,
stopMangohudLogging,
getHardwareInfo,
getOsVersion,
@@ -71,10 +72,12 @@ function Content() {
// ── Handle start recording ────────────────────────────────────
async function handleStart() {
// Write MangoHud config with autostart_log so logging begins on game launch
// Write MangoHud config with logging settings
await writeMangohudConfig()
// Clear any previous log file
await clearMangohudLog()
// Fire-and-forget: try to start MangoHud logging (retries until game launches)
startMangohudLogging()
startRecording()
}