From 7bc9a680a24582b2cb3a82cbdaf383b2330c3b21 Mon Sep 17 00:00:00 2001 From: notaz Date: Wed, 5 Aug 2009 19:22:23 +0000 Subject: [PATCH] do full frame before menu for proper bg git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@734 be3aeb3a-fb24-0410-a615-afba39da0efa --- common/emu.c | 11 +++++------ gp2x/emu.c | 16 ++++++++++++++++ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/common/emu.c b/common/emu.c index 7de2aa9..becc0c2 100644 --- a/common/emu.c +++ b/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/gp2x/emu.c b/gp2x/emu.c index 82f1c1d..7e60c2b 100644 --- a/gp2x/emu.c +++ b/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) -- 2.39.5