fix(plugin): add manual game name input, autostart MangoHud logging

This commit is contained in:
2026-06-28 18:57:51 +08:00
parent 7ab7af468a
commit 65e56702b0
3 changed files with 30 additions and 7 deletions
+8
View File
@@ -171,6 +171,13 @@ export function useSession() {
currentAppNameRef.current = ""
}, [])
// Manual game name override (fallback when SteamClient events don't fire)
const setGameName = useCallback((name: string, appId?: number) => {
currentAppNameRef.current = name
if (appId !== undefined) currentAppIdRef.current = appId
setSession((prev) => ({ ...prev, gameName: name, appId: appId ?? prev.appId }))
}, [])
return {
recordingState,
session,
@@ -184,6 +191,7 @@ export function useSession() {
reset,
onGameStart,
onGameStop,
setGameName,
}
}