From 83e23e9cce428677b86e07362b1522f6705e45b9 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Fri, 11 Sep 2015 21:22:57 -0700 Subject: [PATCH] GUI: Only wait up to 30 frames when unpausing --- src/gba/gui/gui-runner.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gba/gui/gui-runner.c b/src/gba/gui/gui-runner.c index df7d5ee39..4d8eedd46 100644 --- a/src/gba/gui/gui-runner.c +++ b/src/gba/gui/gui-runner.c @@ -267,7 +267,13 @@ void GBAGUIRunloop(struct GBAGUIRunner* runner) { 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) {