Pressing [UP] when on first menu item puts you at the last.

Pressing [DOWN] when on the last menu item puts you on the first.
This commit is contained in:
Rikard Bengtsson
2019-09-28 23:24:56 +02:00
parent d648fbba62
commit 63642a7624
2 changed files with 39 additions and 13 deletions

View File

@@ -1245,7 +1245,11 @@ int ScanDirectory(char* path, int mode, const char *extension, int options, cons
iSelectedEntry++;
if (iSelectedEntry > iFirstEntry + OsdGetSize() - 1) iFirstEntry = iSelectedEntry - OsdGetSize() + 1;
}
return 0;
else
{
ScanDirectory(path, SCANF_INIT, extension, options, prefix); // jump to first visible item
}
return 0;
}
else if (mode == SCANF_PREV)
{
@@ -1254,7 +1258,11 @@ int ScanDirectory(char* path, int mode, const char *extension, int options, cons
iSelectedEntry--;
if (iSelectedEntry < iFirstEntry) iFirstEntry = iSelectedEntry;
}
return 0;
else
{
ScanDirectory(path, SCANF_END, extension, options, prefix); // jump to last visible item
}
return 0;
}
else if (mode == SCANF_NEXT_PAGE)
{