X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=psp%2Femu.c;h=a5e6ba7d2c77e787df3d83a768ddef3357bc4828;hb=677b5dd8142b2f98b22a26e4d1757355cba4bdc5;hp=665e41cc03a2ed24619537668ef8bd761e28c969;hpb=6d741b3258179dadc7890f45e155b0a6871ebdc5;p=libpicofe.git diff --git a/psp/emu.c b/psp/emu.c index 665e41c..a5e6ba7 100644 --- a/psp/emu.c +++ b/psp/emu.c @@ -33,7 +33,7 @@ int sceAudioOutput2GetRestSample(); char romFileName[PATH_MAX]; unsigned char *PicoDraw2FB = (unsigned char *)VRAM_CACHED_STUFF + 8; // +8 to be able to skip border with 1 quadword.. -int engineState; +int engineState = PGS_Menu; static int combo_keys = 0, combo_acts = 0; // keys and actions which need button combos static unsigned int noticeMsgTime = 0; @@ -1075,3 +1075,19 @@ void emu_ResetGame(void) reset_timing = 1; } +void emu_HandleResume(void) +{ + if (!(PicoMCD & 1)) return; + + // reopen files.. + if (Pico_mcd->TOC.Tracks[0].F != NULL) + { + lprintf("emu_HandleResume: reopen %s\n", romFileName); + pm_close(Pico_mcd->TOC.Tracks[0].F); + Pico_mcd->TOC.Tracks[0].F = pm_open(romFileName); + lprintf("reopen %s\n", Pico_mcd->TOC.Tracks[0].F != NULL ? "ok" : "failed"); + } + + mp3_reopen_file(); +} +