rosalina: restore fillcolor reg

This commit is contained in:
Nanquitas 2020-07-27 06:50:12 +02:00 committed by GitHub
parent 8c7f31bb4d
commit 804268916a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,7 +36,7 @@
#define KERNPA2VA(a) ((a) + (GET_VERSION_MINOR(osGetKernelVersion()) < 44 ? 0xD0000000 : 0xC0000000))
static u32 gpuSavedFramebufferAddr1, gpuSavedFramebufferAddr2, gpuSavedFramebufferFormat, gpuSavedFramebufferStride;
static u32 gpuSavedFramebufferAddr1, gpuSavedFramebufferAddr2, gpuSavedFramebufferFormat, gpuSavedFramebufferStride, gpuSavedFillColor;
static u32 framebufferCacheSize;
static void *framebufferCache;
static RecursiveLock lock;
@ -203,8 +203,9 @@ u32 Draw_SetupFramebuffer(void)
GPU_FB_BOTTOM_ADDR_1 = GPU_FB_BOTTOM_ADDR_2 = FB_BOTTOM_VRAM_PA;
GPU_FB_BOTTOM_FMT = format;
GPU_FB_BOTTOM_STRIDE = 240 * 2;
LCD_BOT_FILLCOLOR &= ~LCD_FILLCOLOR_ENABLE;
gpuSavedFillColor = LCD_BOT_FILLCOLOR;
LCD_BOT_FILLCOLOR = 0;
return framebufferCacheSize;
}
@ -213,7 +214,8 @@ void Draw_RestoreFramebuffer(void)
{
memcpy(FB_BOTTOM_VRAM_ADDR, framebufferCache, FB_BOTTOM_SIZE);
Draw_FlushFramebuffer();
LCD_BOT_FILLCOLOR = gpuSavedFillColor;
GPU_FB_BOTTOM_ADDR_1 = gpuSavedFramebufferAddr1;
GPU_FB_BOTTOM_ADDR_2 = gpuSavedFramebufferAddr2;
GPU_FB_BOTTOM_FMT = gpuSavedFramebufferFormat;