mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-18 15:15:37 +00:00
Allow to show hidden files on Windows
Skip hidden files earlier
This commit is contained in:
parent
dc541e5e25
commit
747e400593
|
@ -97,6 +97,10 @@ void SystemData::populateFolder(FileData* folder)
|
||||||
{
|
{
|
||||||
filePath = *it;
|
filePath = *it;
|
||||||
|
|
||||||
|
// skip hidden files and folders
|
||||||
|
if(!showHidden && Utils::FileSystem::isHidden(filePath))
|
||||||
|
continue;
|
||||||
|
|
||||||
//this is a little complicated because we allow a list of extensions to be defined (delimited with a space)
|
//this is a little complicated because we allow a list of extensions to be defined (delimited with a space)
|
||||||
//we first get the extension of the file itself:
|
//we first get the extension of the file itself:
|
||||||
extension = Utils::FileSystem::getExtension(filePath);
|
extension = Utils::FileSystem::getExtension(filePath);
|
||||||
|
@ -107,10 +111,6 @@ void SystemData::populateFolder(FileData* folder)
|
||||||
isGame = false;
|
isGame = false;
|
||||||
if(std::find(mEnvData->mSearchExtensions.cbegin(), mEnvData->mSearchExtensions.cend(), extension) != mEnvData->mSearchExtensions.cend())
|
if(std::find(mEnvData->mSearchExtensions.cbegin(), mEnvData->mSearchExtensions.cend(), extension) != mEnvData->mSearchExtensions.cend())
|
||||||
{
|
{
|
||||||
// skip hidden files
|
|
||||||
if(!showHidden && Utils::FileSystem::isHidden(filePath))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
FileData* newGame = new FileData(GAME, filePath, mEnvData, this);
|
FileData* newGame = new FileData(GAME, filePath, mEnvData, this);
|
||||||
folder->addChild(newGame);
|
folder->addChild(newGame);
|
||||||
isGame = true;
|
isGame = true;
|
||||||
|
|
|
@ -363,13 +363,11 @@ void GuiMenu::openOtherSettings()
|
||||||
s->addWithLabel("PARSE GAMESLISTS ONLY", parse_gamelists);
|
s->addWithLabel("PARSE GAMESLISTS ONLY", parse_gamelists);
|
||||||
s->addSaveFunc([parse_gamelists] { Settings::getInstance()->setBool("ParseGamelistOnly", parse_gamelists->getState()); });
|
s->addSaveFunc([parse_gamelists] { Settings::getInstance()->setBool("ParseGamelistOnly", parse_gamelists->getState()); });
|
||||||
|
|
||||||
#ifndef WIN32
|
|
||||||
// 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", hidden_files);
|
||||||
s->addSaveFunc([hidden_files] { Settings::getInstance()->setBool("ShowHiddenFiles", hidden_files->getState()); });
|
s->addSaveFunc([hidden_files] { Settings::getInstance()->setBool("ShowHiddenFiles", hidden_files->getState()); });
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _RPI_
|
#ifdef _RPI_
|
||||||
// Video Player - VideoOmxPlayer
|
// Video Player - VideoOmxPlayer
|
||||||
|
|
Loading…
Reference in a new issue