all repos — mgba @ 9061620e582edc37b85a913cb297a1b451578fb0

mGBA Game Boy Advance Emulator

Wii: Fix drawing caching regression (fixes #1185)
Vicki Pfau vi@endrift.com
Sat, 29 Sep 2018 10:05:43 -0700
commit

9061620e582edc37b85a913cb297a1b451578fb0

parent

20f900520d7e3e6047ba5169befe3ed26e3f9a04

2 files changed, 8 insertions(+), 7 deletions(-)

jump to
M CHANGESCHANGES

@@ -107,6 +107,7 @@ - PSP2: Fix audio crackling after fast forward

- PSP2: Fix audio crackling when buffer is full - 3DS: Fix unused screens not clearing (fixes mgba.io/i/1184) - GBA Video: Fix caching with background toggling (fixes mgba.io/i/1118) + - Wii: Fix drawing caching regression (fixes mgba.io/i/1185) Misc: - mGUI: Add SGB border configuration option
M src/platform/wii/main.csrc/platform/wii/main.c

@@ -195,18 +195,18 @@ guiScale = GUI_SCALE_240p;

break; } - free(framebuffer[0]); - free(framebuffer[1]); - VIDEO_SetBlack(true); VIDEO_Configure(vmode); + + free(framebuffer[0]); + free(framebuffer[1]); framebuffer[0] = SYS_AllocateFramebuffer(vmode); framebuffer[1] = SYS_AllocateFramebuffer(vmode); - VIDEO_ClearFrameBuffer(vmode, framebuffer[0], COLOR_BLACK); - VIDEO_ClearFrameBuffer(vmode, framebuffer[1], COLOR_BLACK); + VIDEO_ClearFrameBuffer(vmode, MEM_K0_TO_K1(framebuffer[0]), COLOR_BLACK); + VIDEO_ClearFrameBuffer(vmode, MEM_K0_TO_K1(framebuffer[1]), COLOR_BLACK); - VIDEO_SetNextFramebuffer(framebuffer[whichFb]); + VIDEO_SetNextFramebuffer(MEM_K0_TO_K1(framebuffer[whichFb])); VIDEO_Flush(); VIDEO_WaitVSync(); if (vmode->viTVMode & VI_NON_INTERLACE) {

@@ -595,7 +595,7 @@

static void _drawEnd(void) { GX_CopyDisp(framebuffer[whichFb], GX_TRUE); GX_DrawDone(); - VIDEO_SetNextFramebuffer(framebuffer[whichFb]); + VIDEO_SetNextFramebuffer(MEM_K0_TO_K1(framebuffer[whichFb])); VIDEO_Flush(); whichFb = !whichFb;