Add frame advance option to developer tools (#3435)

This commit is contained in:
Garrett Cox
2023-12-27 00:08:37 +00:00
committed by GitHub
parent 6a7bcc4a5e
commit 70e1017923
2 changed files with 22 additions and 1 deletions

View File

@@ -18,9 +18,10 @@ s32 FrameAdvance_Update(FrameAdvanceContext* frameAdvCtx, Input* input) {
frameAdvCtx->enabled = !frameAdvCtx->enabled;
}
if (!frameAdvCtx->enabled || (CHECK_BTN_ALL(input->cur.button, BTN_Z) &&
if (!frameAdvCtx->enabled || CVarGetInteger("gFrameAdvance", 0) || (CHECK_BTN_ALL(input->cur.button, BTN_Z) &&
(CHECK_BTN_ALL(input->press.button, BTN_R) ||
(CHECK_BTN_ALL(input->cur.button, BTN_R) && (++frameAdvCtx->timer >= 9))))) {
CVarClear("gFrameAdvance");
frameAdvCtx->timer = 0;
return true;
}