From 90472f27ce0df29f4415eb28dca228828bc420d7 Mon Sep 17 00:00:00 2001 From: anod <182859762@qq.com> Date: Thu, 19 Jan 2023 12:02:40 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4log=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9lineprovider=E5=B9=82=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/arm11/filebrowser.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/source/arm11/filebrowser.c b/source/arm11/filebrowser.c index 87811fe..05e1209 100644 --- a/source/arm11/filebrowser.c +++ b/source/arm11/filebrowser.c @@ -241,19 +241,13 @@ static atp_error_t select_region( atp_callerdata_t data, atp_counter_t index, at acl_chtid_t sid; acl_region_t sreg; char *p = data; - char *t; if( ACHTLIB_SUCCESS != acl_query_cheat_set(index, &sid, &sreg) ) { config->text = "无效数据"; config->value = index; return ATP_SUCCESS; } - if( sreg == p[0] ) p[1]++; - else - { - p[0] = sreg; - p[1] = 'A'; - } + char *t; switch( sreg ) { case 'C': t = "官方中文"; break; @@ -265,7 +259,7 @@ static atp_error_t select_region( atp_callerdata_t data, atp_counter_t index, at case 'D': t = "德语版"; break; default: t = "其他语种"; break; } - ee_sprintf(text, "%s-%c", t, p[1]); + ee_sprintf(text, "%c-%s", t, 'A'+index); config->text = text; config->value = sreg; return ATP_SUCCESS; @@ -319,14 +313,12 @@ static atp_pageopt_t serve_on_key( atp_callerdata_t data, atp_counter_t index, a return WAIT_ON_ERRPAGE( display_noserial ); } else RECOVER_PATH; - DEBUG(serial); acl_count_t len; if( ACHTLIB_SUCCESS != acl_open_lib( "gba.acl" ) ) { return WAIT_ON_ERRPAGE( display_openlib ); } - DEBUG("open_lib ok"); if( ACHTLIB_SUCCESS != acl_select_game( serial, 0, &len ) ) { acl_close_lib(); @@ -337,13 +329,11 @@ static atp_pageopt_t serve_on_key( atp_callerdata_t data, atp_counter_t index, a acl_close_lib(); return WAIT_ON_ERRPAGE( display_nocheat ); } - DEBUG("select_game ok"); // 显示配置页面 atp_error_t res; atp_itemval_t item; - char type[2] = {' ', 'A'}; - res = atp_select("选择一个金手指配置", len, select_region, NULL, type, 0, 0, &item ); + res = atp_select("选择一个金手指配置", len, select_region, NULL, NULL, 0, 0, &item ); acl_close_lib(); return WAIT_ON_ACT( res );