From c0888e885b37565277b3e3c8657053486988fbb9 Mon Sep 17 00:00:00 2001 From: anod <182859762@qq.com> Date: Mon, 17 Oct 2022 13:40:35 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=98=E6=98=AF=E6=B2=A1=E6=B3=95=E5=A4=84?= =?UTF-8?q?=E7=90=86=E4=BA=AE=E5=BA=A6=EF=BC=8C=E8=AF=95=E8=AF=95=E5=8A=A0?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E5=A4=84=E7=90=86=E6=A3=80=E6=B5=8B=E5=AD=98?= =?UTF-8?q?=E6=A1=A3=E7=B1=BB=E5=9E=8B=E7=9A=84=E7=9C=8B=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/arm11/open_agb_firm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/arm11/open_agb_firm.c b/source/arm11/open_agb_firm.c index 4b4bcf6..c516d35 100644 --- a/source/arm11/open_agb_firm.c +++ b/source/arm11/open_agb_firm.c @@ -161,17 +161,18 @@ static atp_pageopt_t config_adjust( atp_callerdata_t data, atp_counter_t index, if( l || x ) { light -= 10; - if( light % 10 ) light = light + (10-light%10); + if( light % 10 ) light += 10 - light%10; } else if( r || y ) { light += 10; - if( light % 10 ) light = light - light % 10; + if( light % 10 ) light -= light % 10; } if( light > LIGHT_MAX ) light = LIGHT_MAX; else if( light < LIGHT_MIN ) light = LIGHT_MIN; g_oafConfig.backlight = light; } + g_oafConfig.saveOverride = !g_oafConfig.saveOverride; return ATP_PAGE_UPDATE; }