添加键位冲突提示

This commit is contained in:
anod 2023-04-25 23:46:30 +08:00
parent b9b396b652
commit 23533fdb1b

View File

@ -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;
}