mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-03-06 14:27:43 +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
|
--resolution [width] [height] Try to force a particular resolution
|
||||||
--gamelist-only Skip automatic game ROM search, only read from gamelist.xml
|
--gamelist-only Skip automatic game ROM search, only read from gamelist.xml
|
||||||
--ignore-gamelist Ignore the gamelist files (useful for troubleshooting)
|
--ignore-gamelist Ignore the gamelist files (useful for troubleshooting)
|
||||||
|
--show-hidden-files Show hidden files and folders
|
||||||
--draw-framerate Display the framerate
|
--draw-framerate Display the framerate
|
||||||
--no-exit Don't show the exit option in the menu
|
--no-exit Don't show the exit option in the menu
|
||||||
--no-splash Don't show the splash screen
|
--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
|
--resolution [width] [height] Try to force a particular resolution
|
||||||
--gamelist-only Skip automatic game ROM search, only read from gamelist.xml
|
--gamelist-only Skip automatic game ROM search, only read from gamelist.xml
|
||||||
--ignore-gamelist Ignore the gamelist files (useful for troubleshooting)
|
--ignore-gamelist Ignore the gamelist files (useful for troubleshooting)
|
||||||
|
--show-hidden-files Show hidden files and folders
|
||||||
--draw-framerate Display the framerate
|
--draw-framerate Display the framerate
|
||||||
--no-exit Don't show the exit option in the menu
|
--no-exit Don't show the exit option in the menu
|
||||||
--no-splash Don't show the splash screen
|
--no-splash Don't show the splash screen
|
||||||
|
|
|
@ -114,6 +114,7 @@ void parseGamelist(SystemData* system)
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string relativeTo = system->getStartPath();
|
std::string relativeTo = system->getStartPath();
|
||||||
|
bool showHiddenFiles = Settings::getInstance()->getBool("ShowHiddenFiles");
|
||||||
|
|
||||||
const char* tagList[2] = { "game", "folder" };
|
const char* tagList[2] = { "game", "folder" };
|
||||||
FileType typeList[2] = { GAME, FOLDER };
|
FileType typeList[2] = { GAME, FOLDER };
|
||||||
|
@ -131,6 +132,12 @@ void parseGamelist(SystemData* system)
|
||||||
continue;
|
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);
|
FileData* file = findOrCreateFile(system, path, type);
|
||||||
if (!file) {
|
if (!file) {
|
||||||
LOG(LogError) << "Error finding/creating FileData for \"" <<
|
LOG(LogError) << "Error finding/creating FileData for \"" <<
|
||||||
|
|
|
@ -120,7 +120,7 @@ bool SystemData::populateFolder(FileData* folder)
|
||||||
std::string filePath;
|
std::string filePath;
|
||||||
std::string extension;
|
std::string extension;
|
||||||
bool isGame;
|
bool isGame;
|
||||||
bool showHidden = Settings::getInstance()->getBool("ShowHiddenFiles");
|
bool showHiddenFiles = Settings::getInstance()->getBool("ShowHiddenFiles");
|
||||||
Utils::FileSystem::stringList dirContent = Utils::FileSystem::getDirContent(folderPath);
|
Utils::FileSystem::stringList dirContent = Utils::FileSystem::getDirContent(folderPath);
|
||||||
|
|
||||||
// If system directory exists but contains no games, return as error.
|
// If system directory exists but contains no games, return as error.
|
||||||
|
@ -132,7 +132,7 @@ bool SystemData::populateFolder(FileData* folder)
|
||||||
filePath = *it;
|
filePath = *it;
|
||||||
|
|
||||||
// Skip hidden files and folders.
|
// Skip hidden files and folders.
|
||||||
if (!showHidden && Utils::FileSystem::isHidden(filePath))
|
if (!showHiddenFiles && Utils::FileSystem::isHidden(filePath))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// This is a little complicated because we allow a list
|
// This is a little complicated because we allow a list
|
||||||
|
|
Binary file not shown.
|
@ -640,7 +640,7 @@ void GuiMenu::openOtherSettings()
|
||||||
// Hidden files.
|
// Hidden files.
|
||||||
auto hidden_files = std::make_shared<SwitchComponent>(mWindow);
|
auto hidden_files = std::make_shared<SwitchComponent>(mWindow);
|
||||||
hidden_files->setState(Settings::getInstance()->getBool("ShowHiddenFiles"));
|
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",
|
s->addSaveFunc([hidden_files] { Settings::getInstance()->setBool("ShowHiddenFiles",
|
||||||
hidden_files->getState()); });
|
hidden_files->getState()); });
|
||||||
|
|
||||||
|
|
|
@ -285,6 +285,7 @@ bool parseArgs(int argc, char* argv[])
|
||||||
" --resolution [width] [height] Try to force a particular resolution\n"
|
" --resolution [width] [height] Try to force a particular resolution\n"
|
||||||
" --gamelist-only Skip automatic game ROM search, only read from gamelist.xml\n"
|
" --gamelist-only Skip automatic game ROM search, only read from gamelist.xml\n"
|
||||||
" --ignore-gamelist Ignore the gamelist files (useful for troubleshooting)\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"
|
" --draw-framerate Display the framerate\n"
|
||||||
" --no-exit Don't show the exit option in the menu\n"
|
" --no-exit Don't show the exit option in the menu\n"
|
||||||
" --no-splash Don't show the splash screen\n"
|
" --no-splash Don't show the splash screen\n"
|
||||||
|
|
Loading…
Reference in a new issue