From fb68092f8e1da45f801541c5b8431beacb55c5d1 Mon Sep 17 00:00:00 2001 From: anod <182859762@qq.com> Date: Fri, 21 Oct 2022 11:47:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=85=8D=E7=BD=AE=E5=AD=98?= =?UTF-8?q?=E7=9B=98=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/arm11/open_agb_firm.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/source/arm11/open_agb_firm.c b/source/arm11/open_agb_firm.c index 5b16b90..88d728d 100644 --- a/source/arm11/open_agb_firm.c +++ b/source/arm11/open_agb_firm.c @@ -229,7 +229,16 @@ static atp_pageopt_t config_adjust( atp_callerdata_t, atp_counter_t index, atp_b } else if( x ) { - // TODO : STRING FORMAT AND QUICK SAVE + int len = strlen(CONFIG_OUTPUT) + 20; + char *data = malloc( len ); + if( data == NULL ) return ATP_PAGE_DOSELECT; // only ignore this save + + ee_snprintf( + data, len, CONFIG_OUTPUT, + g_oafConfig.backlight, g_oafConfig.directBoot ? "true":"false", g_oafConfig.scaler, g_oafConfig.savePolicy + ); + fsQuickWrite("config.ini", data, strlen(data)); + free( data ); return ATP_PAGE_DOSELECT; } return ATP_PAGE_UPDATE;