mirror of https://github.com/mgba-emu/mgba.git
mGUI: Fix frame limiter breaking in menus
This commit is contained in:
parent
b03412aa38
commit
ab8321ac34
|
@ -441,10 +441,12 @@ void mGUIRun(struct mGUIRunner* runner, const char* path) {
|
||||||
if (guiKeys & (1 << mGUI_INPUT_SCREENSHOT)) {
|
if (guiKeys & (1 << mGUI_INPUT_SCREENSHOT)) {
|
||||||
mCoreTakeScreenshot(runner->core);
|
mCoreTakeScreenshot(runner->core);
|
||||||
}
|
}
|
||||||
if (heldKeys & (1 << mGUI_INPUT_FAST_FORWARD)) {
|
if (runner->setFrameLimiter) {
|
||||||
runner->setFrameLimiter(runner, false);
|
if (heldKeys & (1 << mGUI_INPUT_FAST_FORWARD)) {
|
||||||
} else {
|
runner->setFrameLimiter(runner, false);
|
||||||
runner->setFrameLimiter(runner, true);
|
} else {
|
||||||
|
runner->setFrameLimiter(runner, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
uint16_t keys = runner->pollGameInput(runner);
|
uint16_t keys = runner->pollGameInput(runner);
|
||||||
if (runner->prepareForFrame) {
|
if (runner->prepareForFrame) {
|
||||||
|
@ -501,6 +503,10 @@ void mGUIRun(struct mGUIRunner* runner, const char* path) {
|
||||||
if (runner->paused) {
|
if (runner->paused) {
|
||||||
runner->paused(runner);
|
runner->paused(runner);
|
||||||
}
|
}
|
||||||
|
if (runner->setFrameLimiter) {
|
||||||
|
runner->setFrameLimiter(runner, true);
|
||||||
|
}
|
||||||
|
|
||||||
GUIInvalidateKeys(&runner->params);
|
GUIInvalidateKeys(&runner->params);
|
||||||
uint32_t keys = 0xFFFFFFFF; // Huge hack to avoid an extra variable!
|
uint32_t keys = 0xFFFFFFFF; // Huge hack to avoid an extra variable!
|
||||||
struct GUIMenuItem* item;
|
struct GUIMenuItem* item;
|
||||||
|
|
Loading…
Reference in New Issue