From: kub Date: Thu, 21 Oct 2021 18:52:20 +0000 (+0200) Subject: psp, fix suspend/resume X-Git-Tag: v2.00~454 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f0e6d1e371bef07ba7d998d245243b0d60fca8c4;p=picodrive.git psp, fix suspend/resume --- diff --git a/platform/psp/emu.c b/platform/psp/emu.c index eac00609..89b2c26c 100644 --- a/platform/psp/emu.c +++ b/platform/psp/emu.c @@ -756,25 +756,10 @@ void pemu_loop_end(void) pemu_sound_stop(); } -// TODO +/* resume from suspend: change to main menu if emu was running */ void emu_handle_resume(void) { - if (!(PicoIn.AHW & PAHW_MCD)) return; - - // reopen first CD track - if (cdd.toc.tracks[0].fd != NULL) - { - lprintf("emu_HandleResume: reopen %s\n", cdd.toc.tracks[0].fname); - pm_close(cdd.toc.tracks[0].fd); - cdd.toc.tracks[0].fd = pm_open(cdd.toc.tracks[0].fname); - lprintf("reopen %s\n", cdd.toc.tracks[0].fd != NULL ? "ok" : "failed"); - } - - mp3_reopen_file(); - -#if 0 // TODO - if (!(Pico_mcd->s68k_regs[0x36] & 1)) - cdd_change_track(cdd.index, cdd.lba); -#endif + if (engineState == PGS_Running) + engineState = PGS_Menu; }