mirror of
https://github.com/coderkei/akmenu-next.git
synced 2025-06-19 01:15:32 -04:00
mainlist: sanity check going back from top menu
When going back to the top directory, the code passes "...". But what if you go back *from* the top directory? In this case, the menu goes crazy and loads the SD card directory, and it is impossible to go back to the top directory. At the top directory, the location is not "..." but actually "". It is also possible for the directory passed to be ".../". Add a check for all these probabilities and treat them like the top directory.
This commit is contained in:
parent
794685e291
commit
5eac5c72b8
@ -109,7 +109,7 @@ static bool extnameFilter(const std::vector<std::string>& extNames, std::string
|
||||
|
||||
bool cMainList::enterDir(const std::string& dirName) {
|
||||
_saves.clear();
|
||||
if ("..." == dirName) // select RPG or SD card
|
||||
if (memcmp(dirName.c_str(), "...", 3) == 0 || dirName.empty()) // select RPG or SD card
|
||||
{
|
||||
removeAllRows();
|
||||
_romInfoList.clear();
|
||||
|
Loading…
Reference in New Issue
Block a user