Merge pull request #1466 from Nanquitas/black-fillcolor

Rosalina: ignore fillcolor when opening the menu
This commit is contained in:
TuxSH 2020-11-17 01:30:24 +00:00 committed by GitHub
commit c058e3f446
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View File

@ -55,7 +55,11 @@
#define GPU_CMDLIST_CNT REG32(0x104018F0)
#define LCD_TOP_BRIGHTNESS REG32(0x10202240)
#define LCD_TOP_FILLCOLOR REG32(0x10202204)
#define LCD_BOT_BRIGHTNESS REG32(0x10202A40)
#define LCD_BOT_FILLCOLOR REG32(0x10202A04)
#define LCD_FILLCOLOR_ENABLE (1u << 24)
#define FB_BOTTOM_VRAM_ADDR ((void *)0x1F48F000) // cached
#define FB_BOTTOM_VRAM_PA 0x1848F000

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;
@ -204,6 +204,9 @@ u32 Draw_SetupFramebuffer(void)
GPU_FB_BOTTOM_FMT = format;
GPU_FB_BOTTOM_STRIDE = 240 * 2;
gpuSavedFillColor = LCD_BOT_FILLCOLOR;
LCD_BOT_FILLCOLOR = 0;
return framebufferCacheSize;
}
@ -212,6 +215,7 @@ 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;