From b7b72cf31f97c44a519f69c6bfaaf5003732c6f5 Mon Sep 17 00:00:00 2001 From: anod <182859762@qq.com> Date: Tue, 25 Apr 2023 11:20:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8F=90=E7=A4=BA=E5=86=85?= =?UTF-8?q?=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/arm11/filebrowser.c | 57 ++++++++++++++++++++++++++++---------- 1 file changed, 42 insertions(+), 15 deletions(-) diff --git a/source/arm11/filebrowser.c b/source/arm11/filebrowser.c index 1a0c1ef..85376f5 100644 --- a/source/arm11/filebrowser.c +++ b/source/arm11/filebrowser.c @@ -458,7 +458,7 @@ static atp_error_t select_keys( atp_callerdata_t data, atp_counter_t index, atp_ return ATP_SUCCESS; } -static inline void key_tips( key_remix_t *p, atp_itemcfg_t *cfg ) +static inline void key_tips( key_remix_t *p, atp_boolean_t checking, atp_itemcfg_t *cfg ) { if( p->remix_type == REMIX_TYPE_NONE ) { @@ -467,30 +467,57 @@ static inline void key_tips( key_remix_t *p, atp_itemcfg_t *cfg ) } else { - if( p->game_keys==0 || p->device_keys==0 ) + if( p->remix_type == REMIX_TYPE_CHEAT ) { - cfg->extra_text = "配置不齐"; - cfg->extra_text_color = ATP_COLOR_RED; - } - else if( p->remix_type == REMIX_TYPE_CHEAT ) - { - cfg->extra_text = "金手指键"; - cfg->extra_text_color = ATP_COLOR_GREEN; + if( checking && p->game_keys == 0) + { + cfg->extra_text = "配置不齐"; + cfg->extra_text_color = ATP_COLOR_RED; + } + else + { + cfg->extra_text = "金手指键"; + cfg->extra_text_color = ATP_COLOR_GREEN; + } } else if( p->remix_type == REMIX_TYPE_REMAP ) { - cfg->extra_text = "键位映射"; - cfg->extra_text_color = ATP_COLOR_GREEN; + if( checking && (p->game_keys==0 || p->device_keys==0) ) + { + cfg->extra_text = "配置不齐"; + cfg->extra_text_color = ATP_COLOR_RED; + } + else + { + cfg->extra_text = "键位映射"; + cfg->extra_text_color = ATP_COLOR_GREEN; + } } else if( p->remix_type == REMIX_TYPE_UNLINK ) { - cfg->extra_text = "禁用原键位"; - cfg->extra_text_color = ATP_COLOR_GREEN; + if( checking && p->device_keys == 0 ) + { + cfg->extra_text = "配置不齐"; + cfg->extra_text_color = ATP_COLOR_RED; + } + else + { + cfg->extra_text = "禁用原键位"; + cfg->extra_text_color = ATP_COLOR_GREEN; + } } else if( p->remix_type == REMIX_TYPE_HOLD ) { - cfg->extra_text = "自动蓄力"; - cfg->extra_text_color = ATP_COLOR_GREEN; + if( checking && (p->game_keys==0 || p->device_keys==0) ) + { + cfg->extra_text = "配置不齐"; + cfg->extra_text_color = ATP_COLOR_RED; + } + else + { + cfg->extra_text = "自动蓄力"; + cfg->extra_text_color = ATP_COLOR_GREEN; + } } } }