mirror of https://github.com/mgba-emu/mgba.git
GUI: Fix
This commit is contained in:
parent
b1d915abbc
commit
2725d6ed2f
|
@ -191,29 +191,32 @@ void GBAGUIRunloop(struct GBAGUIRunner* runner) {
|
|||
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) {
|
||||
runner->gameLoaded(runner);
|
||||
|
|
Loading…
Reference in New Issue