all repos — mgba @ 83e23e9cce428677b86e07362b1522f6705e45b9

mGBA Game Boy Advance Emulator

GUI: Only wait up to 30 frames when unpausing
Jeffrey Pfau jeffrey@endrift.com
Fri, 11 Sep 2015 21:22:57 -0700
commit

83e23e9cce428677b86e07362b1522f6705e45b9

parent

486616461367427c5798c84b7a8aa5676c9c6261

1 files changed, 7 insertions(+), 1 deletions(-)

jump to
M src/gba/gui/gui-runner.csrc/gba/gui/gui-runner.c

@@ -267,7 +267,13 @@ case RUNNER_CONTINUE:

break; } } - while (keys) { + int frames = 0; + GUIPollInput(&runner->params, 0, &keys); + while (keys && frames < 30) { + ++frames; + runner->params.drawStart(); + runner->drawFrame(runner, true); + runner->params.drawEnd(); GUIPollInput(&runner->params, 0, &keys); } if (runner->unpaused) {