From: notaz Date: Wed, 5 Aug 2009 19:22:23 +0000 (+0000) Subject: do full frame before menu for proper bg X-Git-Tag: v1.85~314 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=730259b7bbbaa033a531c489fb32b49e4499d10c;p=picodrive.git do full frame before menu for proper bg git-svn-id: file:///home/notaz/opt/svn/PicoDrive@734 be3aeb3a-fb24-0410-a615-afba39da0efa --- diff --git a/platform/common/emu.c b/platform/common/emu.c index 7de2aa99..becc0c26 100644 --- a/platform/common/emu.c +++ b/platform/common/emu.c @@ -1429,9 +1429,6 @@ void emu_loop(void) emu_set_fastforward(0); - if (PicoAHW & PAHW_MCD) - PicoCDBufferFree(); - // save SRAM if ((currentConfig.EmuOpt & EOPT_EN_SRAM) && SRam.changed) { plat_status_msg_busy_first("Writing SRAM/BRAM..."); @@ -1439,9 +1436,11 @@ void emu_loop(void) SRam.changed = 0; } - // do menu background to be sure it's right - pemu_forced_frame(POPT_EN_SOFTSCALE); - pemu_loop_end(); + + // pemu_loop_end() might want to do 1 frame for bg image, + // so free CD buffer here + if (PicoAHW & PAHW_MCD) + PicoCDBufferFree(); } diff --git a/platform/gp2x/emu.c b/platform/gp2x/emu.c index 82f1c1dc..7e60c2b3 100644 --- a/platform/gp2x/emu.c +++ b/platform/gp2x/emu.c @@ -788,6 +788,22 @@ void pemu_loop_prep(void) void pemu_loop_end(void) { + int po_old = PicoOpt; + int eo_old = currentConfig.EmuOpt; + + /* do one more frame for menu bg */ + PicoOpt &= ~POPT_ALT_RENDERER; + PicoOpt |= POPT_EN_SOFTSCALE|POPT_ACC_SPRITES; + currentConfig.EmuOpt |= EOPT_16BPP; + + PicoScanBegin = EmuScanBegin16; + PicoScanEnd = NULL; + PicoDrawSetColorFormat(1); + Pico.m.dirtyPal = 1; + PicoFrame(); + + PicoOpt = po_old; + currentConfig.EmuOpt = eo_old; } const char *plat_get_credits(void)