~~Cleanup~~ Changes. (#14)
* No builds allowed here as always on other branches, lmao. * Changes. ;)
This commit is contained in:
parent
cfd5a54b1a
commit
e95b48011a
12 changed files with 345 additions and 239 deletions
|
|
@ -25,7 +25,7 @@ extern bool continueNdsScan;
|
|||
extern uint selectedFile;
|
||||
extern int keyRepeatDelay;
|
||||
extern bool dirChanged;
|
||||
extern std::vector<DirEntry> dirContents;
|
||||
std::vector<DirEntry> dirContents;
|
||||
|
||||
extern bool touching(touchPosition touch, Structs::ButtonPos button);
|
||||
extern touchPosition touch;
|
||||
|
|
@ -191,6 +191,21 @@ std::vector<std::string> getContents(const std::string &name, const std::vector<
|
|||
return dirContents;
|
||||
}
|
||||
|
||||
// Directory exist?
|
||||
bool returnIfExist(const std::string &path, const std::vector<std::string> &extensionList) {
|
||||
dirContents.clear();
|
||||
chdir(path.c_str());
|
||||
std::vector<DirEntry> dirContentsTemp;
|
||||
getDirectoryContents(dirContentsTemp, extensionList);
|
||||
for(uint i=0;i<dirContentsTemp.size();i++) {
|
||||
dirContents.push_back(dirContentsTemp[i]);
|
||||
}
|
||||
if (dirContents.size() == 0) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// returns a Path or file to 'std::string'.
|
||||
// selectText is the Text which is displayed on the bottom bar of the top screen.
|
||||
// selectionMode is how you select it. 1 -> Path, 2 -> File.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue