From 23533fdb1b1b18e3bd8247c18306e42986c1472e Mon Sep 17 00:00:00 2001 From: anod <182859762@qq.com> Date: Tue, 25 Apr 2023 23:46:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=94=AE=E4=BD=8D=E5=86=B2?= =?UTF-8?q?=E7=AA=81=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/arm11/filebrowser.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/source/arm11/filebrowser.c b/source/arm11/filebrowser.c index e382a3d..b1d4105 100644 --- a/source/arm11/filebrowser.c +++ b/source/arm11/filebrowser.c @@ -219,6 +219,7 @@ DECLARE_ERROR_PAGE( display_empty, "没有合适的文件" ) DECLARE_ERROR_PAGE( display_toolong, "路径过长,改名或移动文件后再试" ) DECLARE_ERROR_PAGE( display_pathfull, "游戏或目录过量,最多显示999个" ) DECLARE_ERROR_PAGE( display_longname, "文件名总计过长,只显示前面的文件" ) +DECLARE_ERROR_PAGE( display_conflictkey, "和已有键位产生冲突" ) static atp_error_t display_help( atp_callerdata_t table, atp_counter_t index, atp_linecfg_t *config ) { @@ -863,7 +864,21 @@ static atp_pageopt_t serve_on_key( atp_callerdata_t data, atp_counter_t index, a } else if( res == ATP_NO_ACTION ) { - status = DISP_KPOS; + int fault = 0; + for( int i=0; i < KEY_REMIX_LIMIT; ++i ) + { + if( i!=position ) + { + if( g_keyremixConfig[i].remix_type == cur->remix_type + && g_keyremixConfig[i].device_keys == cur->device_keys ) + { + fault = 1; + break; + } + } + } + if( fault ) atp_show(1, display_conflictkey, NULL); + else status = DISP_KPOS; } else break; }