From f0e6d1e371bef07ba7d998d245243b0d60fca8c4 Mon Sep 17 00:00:00 2001 From: kub Date: Thu, 21 Oct 2021 20:52:20 +0200 Subject: [PATCH] psp, fix suspend/resume --- platform/psp/emu.c | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) 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; } -- 2.39.5