mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-26 08:05:38 +00:00
Merge pull request #476 from tomaz82/hidden_files
Allow to show hidden files on Windows
This commit is contained in:
commit
564e9a48e9
|
@ -97,6 +97,10 @@ void SystemData::populateFolder(FileData* folder)
|
|||
{
|
||||
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)
|
||||
//we first get the extension of the file itself:
|
||||
extension = Utils::FileSystem::getExtension(filePath);
|
||||
|
@ -107,10 +111,6 @@ void SystemData::populateFolder(FileData* folder)
|
|||
isGame = false;
|
||||
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);
|
||||
folder->addChild(newGame);
|
||||
isGame = true;
|
||||
|
|
|
@ -363,13 +363,11 @@ void GuiMenu::openOtherSettings()
|
|||
s->addWithLabel("PARSE GAMESLISTS ONLY", parse_gamelists);
|
||||
s->addSaveFunc([parse_gamelists] { Settings::getInstance()->setBool("ParseGamelistOnly", parse_gamelists->getState()); });
|
||||
|
||||
#ifndef WIN32
|
||||
// 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->addSaveFunc([hidden_files] { Settings::getInstance()->setBool("ShowHiddenFiles", hidden_files->getState()); });
|
||||
#endif
|
||||
|
||||
#ifdef _RPI_
|
||||
// Video Player - VideoOmxPlayer
|
||||
|
|
Loading…
Reference in a new issue