From 8175642a2a1a37424ebd4301459bb9a82d4c109a Mon Sep 17 00:00:00 2001 From: Aurora Date: Mon, 18 Jul 2016 21:52:03 +0200 Subject: [PATCH] Fix changing the brightness Needs to be static for some reason --- source/screen.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/screen.c b/source/screen.c index 93258ff..5a317f0 100644 --- a/source/screen.c +++ b/source/screen.c @@ -84,7 +84,9 @@ void deinitScreens(void) void updateBrightness(u32 brightnessIndex) { - u32 brightnessLevel = brightness[brightnessIndex]; + static u32 brightnessLevel; + + brightnessLevel = brightness[brightnessIndex]; void __attribute__((naked)) ARM11(void) { @@ -97,7 +99,7 @@ void updateBrightness(u32 brightnessIndex) WAIT_FOR_ARM9(); } - + flushDCacheRange(&brightnessLevel, 4); invokeArm11Function(ARM11); }