Res: Auto-register frame callback

This commit is contained in:
Vicki Pfau 2022-06-24 19:01:33 -07:00
parent d21da6df2d
commit 7fe043146d
1 changed files with 11 additions and 0 deletions

View File

@ -499,10 +499,21 @@ function detectGame()
console:error("Unknown game!")
else
console:log("Found game: " .. game.name)
if not partyBuffer then
partyBuffer = console:createBuffer("Party")
end
end
end
function updateBuffer()
if not game or not partyBuffer then
return
end
printPartyStatus(game, partyBuffer)
end
callbacks:add("start", detectGame)
callbacks:add("frame", updateBuffer)
if emu then
detectGame()
end