GUI: Fix
Extrems metaradil@gmail.com
Wed, 28 Oct 2015 02:03:23 -0400
1 files changed,
11 insertions(+),
8 deletions(-)
jump to
M
src/gba/gui/gui-runner.c
→
src/gba/gui/gui-runner.c
@@ -191,28 +191,31 @@ if (!GUISelectFile(&runner->params, path, sizeof(path), 0)) {
break; } + // TODO: Message box API + runner->params.drawStart(); if (runner->params.guiPrepare) { runner->params.guiPrepare(); } - // TODO: Message box API - runner->params.drawStart(); GUIFontPrint(runner->params.font, runner->params.width / 2, (GUIFontHeight(runner->params.font) + runner->params.height) / 2, GUI_TEXT_CENTER, 0xFFFFFFFF, "Loading..."); - runner->params.drawEnd(); - runner->params.drawStart(); - GUIFontPrint(runner->params.font, runner->params.width / 2, (GUIFontHeight(runner->params.font) + runner->params.height) / 2, GUI_TEXT_CENTER, 0xFFFFFFFF, "Loading..."); + if (runner->params.guiFinish) { + runner->params.guiFinish(); + } runner->params.drawEnd(); if (!GBAContextLoadROM(&runner->context, path, true)) { int i; for (i = 0; i < 300; ++i) { runner->params.drawStart(); + if (runner->params.guiPrepare) { + runner->params.guiPrepare(); + } GUIFontPrint(runner->params.font, runner->params.width / 2, (GUIFontHeight(runner->params.font) + runner->params.height) / 2, GUI_TEXT_CENTER, 0xFFFFFFFF, "Load failed!"); + if (runner->params.guiFinish) { + runner->params.guiFinish(); + } runner->params.drawEnd(); } continue; - } - if (runner->params.guiFinish) { - runner->params.guiFinish(); } bool running = GBAContextStart(&runner->context); if (runner->gameLoaded) {