mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-18 07:05:39 +00:00
Fixed an issue where hidden files would still show up if they had a gamelist.xml entry.
This commit is contained in:
parent
1b38d7f300
commit
e2bd5d05b1
|
@ -559,6 +559,7 @@ You can use `--help` or `-h` to view a list of command line options, as shown he
|
|||
--resolution [width] [height] Try to force a particular resolution
|
||||
--gamelist-only Skip automatic game ROM search, only read from gamelist.xml
|
||||
--ignore-gamelist Ignore the gamelist files (useful for troubleshooting)
|
||||
--show-hidden-files Show hidden files and folders
|
||||
--draw-framerate Display the framerate
|
||||
--no-exit Don't show the exit option in the menu
|
||||
--no-splash Don't show the splash screen
|
||||
|
@ -583,6 +584,7 @@ You can use `--help` or `-h` to view a list of command line options, as shown he
|
|||
--resolution [width] [height] Try to force a particular resolution
|
||||
--gamelist-only Skip automatic game ROM search, only read from gamelist.xml
|
||||
--ignore-gamelist Ignore the gamelist files (useful for troubleshooting)
|
||||
--show-hidden-files Show hidden files and folders
|
||||
--draw-framerate Display the framerate
|
||||
--no-exit Don't show the exit option in the menu
|
||||
--no-splash Don't show the splash screen
|
||||
|
|
|
@ -114,6 +114,7 @@ void parseGamelist(SystemData* system)
|
|||
}
|
||||
|
||||
std::string relativeTo = system->getStartPath();
|
||||
bool showHiddenFiles = Settings::getInstance()->getBool("ShowHiddenFiles");
|
||||
|
||||
const char* tagList[2] = { "game", "folder" };
|
||||
FileType typeList[2] = { GAME, FOLDER };
|
||||
|
@ -131,6 +132,12 @@ void parseGamelist(SystemData* system)
|
|||
continue;
|
||||
}
|
||||
|
||||
// Skip hidden files and folders.
|
||||
if (!showHiddenFiles && Utils::FileSystem::isHidden(path)) {
|
||||
LOG(LogDebug) << "Gamelist::parseGamelist(): Skipping hidden file " << path;
|
||||
continue;
|
||||
}
|
||||
|
||||
FileData* file = findOrCreateFile(system, path, type);
|
||||
if (!file) {
|
||||
LOG(LogError) << "Error finding/creating FileData for \"" <<
|
||||
|
|
|
@ -120,7 +120,7 @@ bool SystemData::populateFolder(FileData* folder)
|
|||
std::string filePath;
|
||||
std::string extension;
|
||||
bool isGame;
|
||||
bool showHidden = Settings::getInstance()->getBool("ShowHiddenFiles");
|
||||
bool showHiddenFiles = Settings::getInstance()->getBool("ShowHiddenFiles");
|
||||
Utils::FileSystem::stringList dirContent = Utils::FileSystem::getDirContent(folderPath);
|
||||
|
||||
// If system directory exists but contains no games, return as error.
|
||||
|
@ -132,7 +132,7 @@ bool SystemData::populateFolder(FileData* folder)
|
|||
filePath = *it;
|
||||
|
||||
// Skip hidden files and folders.
|
||||
if (!showHidden && Utils::FileSystem::isHidden(filePath))
|
||||
if (!showHiddenFiles && Utils::FileSystem::isHidden(filePath))
|
||||
continue;
|
||||
|
||||
// This is a little complicated because we allow a list
|
||||
|
|
Binary file not shown.
|
@ -640,7 +640,7 @@ void GuiMenu::openOtherSettings()
|
|||
// Hidden files.
|
||||
auto hidden_files = std::make_shared<SwitchComponent>(mWindow);
|
||||
hidden_files->setState(Settings::getInstance()->getBool("ShowHiddenFiles"));
|
||||
s->addWithLabel("SHOW HIDDEN FILES", hidden_files);
|
||||
s->addWithLabel("SHOW HIDDEN FILES AND FOLDERS (REQUIRES RESTART)", hidden_files);
|
||||
s->addSaveFunc([hidden_files] { Settings::getInstance()->setBool("ShowHiddenFiles",
|
||||
hidden_files->getState()); });
|
||||
|
||||
|
|
|
@ -285,6 +285,7 @@ bool parseArgs(int argc, char* argv[])
|
|||
" --resolution [width] [height] Try to force a particular resolution\n"
|
||||
" --gamelist-only Skip automatic game ROM search, only read from gamelist.xml\n"
|
||||
" --ignore-gamelist Ignore the gamelist files (useful for troubleshooting)\n"
|
||||
" --show-hidden-files Show hidden files and folders\n"
|
||||
" --draw-framerate Display the framerate\n"
|
||||
" --no-exit Don't show the exit option in the menu\n"
|
||||
" --no-splash Don't show the splash screen\n"
|
||||
|
|
Loading…
Reference in a new issue