From 738a242e3c861597df0c451ba59f755299475eaa Mon Sep 17 00:00:00 2001 From: TuxSH <1922548+TuxSH@users.noreply.github.com> Date: Fri, 17 Jul 2020 13:50:00 +0100 Subject: [PATCH] rosalina: work around gsp bug --- sysmodules/rosalina/source/menus.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysmodules/rosalina/source/menus.c b/sysmodules/rosalina/source/menus.c index e7a1908..43bdf2d 100644 --- a/sysmodules/rosalina/source/menus.c +++ b/sysmodules/rosalina/source/menus.c @@ -232,7 +232,8 @@ void RosalinaMenu_ChangeScreenBrightness(void) else if (pressed & KEY_LEFT) lum -= 10; - lum = lum < 0 ? 0 : lum; + lum = lum < (s32)minLum ? (s32)minLum : lum; + lum = lum > (s32)maxLum ? (s32)maxLum : lum; // We need to call gsp here because updating the active duty LUT is a bit tedious (plus, GSP has internal state). // This is actually SetLuminance: