fix menu key handling in file selector

This commit is contained in:
kub 2023-01-26 21:00:48 +00:00
parent 2d02d8d6fe
commit 9bc19b0fe5

14
menu.c
View file

@ -1108,14 +1108,14 @@ rescan:
namelist[sel]->d_name);
goto rescan;
}
if (inp & PBTN_UP ) { sel--; if (sel < 0) sel = n-1; }
if (inp & PBTN_DOWN) { sel++; if (sel > n-1) sel = 0; }
if (inp & PBTN_LEFT) { sel-=10; if (sel < 0) sel = 0; }
if (inp & PBTN_L) { sel-=24; if (sel < 0) sel = 0; }
if (inp & PBTN_RIGHT) { sel+=10; if (sel > n-1) sel = n-1; }
if (inp & PBTN_R) { sel+=24; if (sel > n-1) sel = n-1; }
if (inp & PBTN_UP ) { sel--; if (sel < 0) sel = n-1; }
else if (inp & PBTN_DOWN) { sel++; if (sel > n-1) sel = 0; }
else if (inp & PBTN_LEFT) { sel-=10; if (sel < 0) sel = 0; }
else if (inp & PBTN_RIGHT) { sel+=10; if (sel > n-1) sel = n-1; }
else if (inp & PBTN_L) { sel-=24; if (sel < 0) sel = 0; }
else if (inp & PBTN_R) { sel+=24; if (sel > n-1) sel = n-1; }
if ((inp & PBTN_MOK) || (inp & (PBTN_MENU|PBTN_MA2)) == (PBTN_MENU|PBTN_MA2))
else if ((inp & PBTN_MOK) || (inp & (PBTN_MENU|PBTN_MA2)) == (PBTN_MENU|PBTN_MA2))
{
if (namelist[sel]->d_type == DT_REG)
{