X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=psp%2Fmain.c;h=4f515169c32574fd0b67f49e18e20744323d5458;hb=a6df06b7633a061862258ec47fa0f6b0efcbe26f;hp=0d121965b69f923eb95fc95eb3259af17acdac0a;hpb=16e89bed918ec39b1e43956b903f7986af86a6b2;p=libpicofe.git diff --git a/psp/main.c b/psp/main.c index 0d12196..4f51516 100644 --- a/psp/main.c +++ b/psp/main.c @@ -1,6 +1,7 @@ #include "psp.h" #include "emu.h" #include "menu.h" +#include "mp3.h" #include "../common/menu.h" #include "../common/emu.h" #include "../common/lprintf.h" @@ -8,12 +9,15 @@ int main() { + int mp3_ret; + lprintf("\nPicoDrive v" VERSION " " __DATE__ " " __TIME__ "\n"); psp_init(); emu_ReadConfig(0, 0); emu_Init(); menu_init(); + mp3_ret = mp3_init(); engineState = PGS_Menu; @@ -26,9 +30,11 @@ int main() break; case PGS_ReloadRom: - if (emu_ReloadRom()) + if (emu_ReloadRom()) { engineState = PGS_Running; - else { + if (mp3_last_error != 0) + engineState = PGS_Menu; // send to menu to display mp3 error + } else { lprintf("PGS_ReloadRom == 0\n"); engineState = PGS_Menu; } @@ -52,6 +58,7 @@ int main() endloop: + if (mp3_ret == 0) mp3_deinit(); emu_Deinit(); psp_finish();