From 20af9c675058b7269ad707e6e3cc5a0d3e438e0d Mon Sep 17 00:00:00 2001 From: Aurora Wright Date: Mon, 18 Dec 2017 04:27:11 +0100 Subject: [PATCH] Fix issue reported in https://github.com/AuroraWright/Luma3DS/commit/f27cdb4543fe63b6b05d8f1950967999c3bdaa44\#commitcomment-24611141, simplify https://github.com/AuroraWright/Luma3DS/commit/56e54cd110e8f1065522c6d6ff5e9411fa9ebd69 --- source/config.c | 6 ++---- source/fs.c | 6 ++---- sysmodules/rosalina/source/draw.c | 6 +++--- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/source/config.c b/source/config.c index aac2d9e..58262da 100644 --- a/source/config.c +++ b/source/config.c @@ -284,11 +284,9 @@ void configMenu(bool oldPinStatus, u32 oldPinMode) u32 pressed; do { - pressed = waitInput(true); + pressed = waitInput(true) & MENU_BUTTONS; } - while(!(pressed & MENU_BUTTONS)); - - pressed &= MENU_BUTTONS; + while(!pressed); if(pressed == BUTTON_START) break; diff --git a/source/fs.c b/source/fs.c index d762ea5..f765042 100644 --- a/source/fs.c +++ b/source/fs.c @@ -204,11 +204,9 @@ bool payloadMenu(char *path) { do { - pressed = waitInput(true); + pressed = waitInput(true) & MENU_BUTTONS; } - while(!(pressed & MENU_BUTTONS)); - - pressed &= MENU_BUTTONS; + while(!pressed); u32 oldSelectedPayload = selectedPayload; diff --git a/sysmodules/rosalina/source/draw.c b/sysmodules/rosalina/source/draw.c index c144c1d..f3f770a 100644 --- a/sysmodules/rosalina/source/draw.c +++ b/sysmodules/rosalina/source/draw.c @@ -250,9 +250,9 @@ static inline void Draw_ConvertPixelToBGR8(u8 *dst, const u8 *src, GSPGPU_Frameb green = (px >> 8) & 0xF; red = (px >> 12) & 0xF; - dst[0] = (blue << 4) | (blue >> 4); - dst[1] = (green << 4) | (green >> 4); - dst[2] = (red << 4) | (red >> 4); + dst[0] = (blue << 4) | (blue >> 0); + dst[1] = (green << 4) | (green >> 0); + dst[2] = (red << 4) | (red >> 0); break; }