X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=psp%2Fmain.c;h=e947b43c13de66566b3e9f7af3efe8e29f805119;hb=960a8e2716349f9a7df6cca9b6e8e6b0724fe7ba;hp=dbe20b7c122d2b6c1352f760a2ceb07a1724e785;hpb=426ecc582f3f6f3d04f7b7ae25b548be7178c4fd;p=libpicofe.git diff --git a/psp/main.c b/psp/main.c index dbe20b7..e947b43 100644 --- a/psp/main.c +++ b/psp/main.c @@ -33,6 +33,7 @@ int pico_main(void) { lprintf("\nPicoDrive v" VERSION " " __DATE__ " " __TIME__ "\n"); psp_init(); + emu_prepareDefaultConfig(); emu_ReadConfig(0, 0); emu_Init(); menu_init(); @@ -49,7 +50,7 @@ int pico_main(void) #ifndef GPROF menu_loop(); #else - strcpy(romFileName, currentConfig.lastRomFile); + strcpy(romFileName, lastRomFile); engineState = PGS_ReloadRom; #endif break; @@ -66,13 +67,18 @@ int pico_main(void) break; case PGS_Suspending: - psp_wait_suspend(); + while (engineState == PGS_Suspending) + psp_wait_suspend(); break; case PGS_RestartRun: engineState = PGS_Running; case PGS_Running: + if (psp_unhandled_suspend) { + psp_resume_suspend(); + emu_HandleResume(); + } emu_Loop(); #ifdef GPROF goto endloop;