Browse: can use 0-9 like a-z

This commit is contained in:
penfold42 2018-08-01 21:42:17 +10:00
parent c080a8cb0c
commit 016b9ce285
2 changed files with 9 additions and 4 deletions

View file

@ -351,13 +351,18 @@ bool FileBrowser::BrowsableList::CheckBrowseNavigation()
dirty |= views[index].CheckBrowseNavigation(index != 0);
}
// check for keys a-z
// check for keys a-z and 0-9
char searchChar = 0;
if (inputMappings->BrowseLetter())
searchChar = inputMappings->getKeyboardLetter();
if (inputMappings->BrowseNumber())
searchChar = inputMappings->getKeyboardNumber();
if (searchChar)
{
char temp[8];
unsigned found=0;
u32 i=0;
snprintf (temp, sizeof(temp), "%c", inputMappings->getKeyboardLetter());
snprintf (temp, sizeof(temp), "%c", searchChar);
// first look from next to last
for (i=1+currentIndex; i <= numberOfEntriesMinus1 ; i++)

View file

@ -186,9 +186,9 @@ public:
inline bool BrowseEnd() { return KeyboardFlag(END_FLAG); }
inline unsigned getKeyboardNumber() { return keyboardNumber; }
inline char getKeyboardNumber() { return keyboardNumber; }
inline char getKeyboardLetter() { return (char) keyboardLetter; }
inline char getKeyboardFunction() { return (char) keyboardFunction; }
inline unsigned getKeyboardFunction() { return (char) keyboardFunction; }
// Used by the 2 cores so need to be volatile
//volatile static unsigned directDiskSwapRequest;