Wii: Fix drawing caching regression (fixes #1185)

This commit is contained in:
Vicki Pfau 2018-09-29 10:05:43 -07:00
parent 20f900520d
commit 9061620e58
2 changed files with 8 additions and 7 deletions

View File

@ -107,6 +107,7 @@ Bugfixes:
- PSP2: Fix audio crackling when buffer is full - PSP2: Fix audio crackling when buffer is full
- 3DS: Fix unused screens not clearing (fixes mgba.io/i/1184) - 3DS: Fix unused screens not clearing (fixes mgba.io/i/1184)
- GBA Video: Fix caching with background toggling (fixes mgba.io/i/1118) - GBA Video: Fix caching with background toggling (fixes mgba.io/i/1118)
- Wii: Fix drawing caching regression (fixes mgba.io/i/1185)
Misc: Misc:
- mGUI: Add SGB border configuration option - mGUI: Add SGB border configuration option

View File

@ -195,18 +195,18 @@ static void reconfigureScreen(struct mGUIRunner* runner) {
break; break;
} }
free(framebuffer[0]);
free(framebuffer[1]);
VIDEO_SetBlack(true); VIDEO_SetBlack(true);
VIDEO_Configure(vmode); VIDEO_Configure(vmode);
free(framebuffer[0]);
free(framebuffer[1]);
framebuffer[0] = SYS_AllocateFramebuffer(vmode); framebuffer[0] = SYS_AllocateFramebuffer(vmode);
framebuffer[1] = SYS_AllocateFramebuffer(vmode); framebuffer[1] = SYS_AllocateFramebuffer(vmode);
VIDEO_ClearFrameBuffer(vmode, framebuffer[0], COLOR_BLACK); VIDEO_ClearFrameBuffer(vmode, MEM_K0_TO_K1(framebuffer[0]), COLOR_BLACK);
VIDEO_ClearFrameBuffer(vmode, framebuffer[1], 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_Flush();
VIDEO_WaitVSync(); VIDEO_WaitVSync();
if (vmode->viTVMode & VI_NON_INTERLACE) { if (vmode->viTVMode & VI_NON_INTERLACE) {
@ -595,7 +595,7 @@ static void _drawStart(void) {
static void _drawEnd(void) { static void _drawEnd(void) {
GX_CopyDisp(framebuffer[whichFb], GX_TRUE); GX_CopyDisp(framebuffer[whichFb], GX_TRUE);
GX_DrawDone(); GX_DrawDone();
VIDEO_SetNextFramebuffer(framebuffer[whichFb]); VIDEO_SetNextFramebuffer(MEM_K0_TO_K1(framebuffer[whichFb]));
VIDEO_Flush(); VIDEO_Flush();
whichFb = !whichFb; whichFb = !whichFb;