From 4b7fe6adf0e1a61e6a7d9e6c66b2013eb65afec6 Mon Sep 17 00:00:00 2001 From: profi200 Date: Thu, 27 Aug 2020 00:01:35 +0200 Subject: [PATCH] Fixed MCU events (thanks to @SonoSooS). --- source/arm11/hardware/lgyfb.c | 2 +- source/arm11/hardware/mcu.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/arm11/hardware/lgyfb.c b/source/arm11/hardware/lgyfb.c index c5b323e..9f3dfde 100644 --- a/source/arm11/hardware/lgyfb.c +++ b/source/arm11/hardware/lgyfb.c @@ -130,7 +130,7 @@ void LGYFB_init(void) /* * Limitations: - * First pattern bit must be 1 and last 0 or it loses sync with the DS/GBA input. + * First pattern bit must be 1 and last 0 (for V-scale) or it loses sync with the DS/GBA input. * * Matrix ranges: * in[-3] -1024-1023 (0xFC00-0x03FF) diff --git a/source/arm11/hardware/mcu.c b/source/arm11/hardware/mcu.c index fb19ccb..00529d1 100644 --- a/source/arm11/hardware/mcu.c +++ b/source/arm11/hardware/mcu.c @@ -24,7 +24,7 @@ static bool g_mcuIrq = false; -static u32 g_events = 0; +static u32 g_mcuEvents = 0; @@ -80,7 +80,7 @@ bool MCU_setEventMask(u32 mask) u32 MCU_getEvents(u32 mask) { - u32 events = g_events; + u32 events = g_mcuEvents; if(atomic_load_explicit(&g_mcuIrq, memory_order_relaxed)) { @@ -92,7 +92,7 @@ u32 MCU_getEvents(u32 mask) events |= data; } - g_mcuIrq = events & ~mask; + g_mcuEvents = events & ~mask; return events & mask; }