mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 23:55:38 +00:00
add setting for searching for local game art - defaults to off
This commit is contained in:
parent
9ae899360c
commit
9af271d36f
|
@ -54,7 +54,7 @@ const std::string FileData::getThumbnailPath() const
|
|||
std::string thumbnail = metadata.get("thumbnail");
|
||||
|
||||
// no thumbnail, try image
|
||||
if(thumbnail.empty())
|
||||
if(thumbnail.empty() && Settings::getInstance()->getBool("LocalArt"))
|
||||
{
|
||||
thumbnail = metadata.get("image");
|
||||
|
||||
|
@ -115,7 +115,7 @@ const std::string FileData::getVideoPath() const
|
|||
std::string video = metadata.get("video");
|
||||
|
||||
// no video, try to use local video
|
||||
if(video.empty())
|
||||
if(video.empty() && Settings::getInstance()->getBool("LocalArt"))
|
||||
{
|
||||
std::string path = mEnvData->mStartPath + "/images/" + getDisplayName() + "-video.mp4";
|
||||
if(Utils::FileSystem::exists(path))
|
||||
|
@ -130,7 +130,7 @@ const std::string FileData::getMarqueePath() const
|
|||
std::string marquee = metadata.get("marquee");
|
||||
|
||||
// no marquee, try to use local marquee
|
||||
if(marquee.empty())
|
||||
if(marquee.empty() && Settings::getInstance()->getBool("LocalArt"))
|
||||
{
|
||||
const char* extList[2] = { ".png", ".jpg" };
|
||||
for(int i = 0; i < 2; i++)
|
||||
|
|
|
@ -407,6 +407,11 @@ void GuiMenu::openOtherSettings()
|
|||
s->addWithLabel("PARSE GAMESLISTS ONLY", parse_gamelists);
|
||||
s->addSaveFunc([parse_gamelists] { Settings::getInstance()->setBool("ParseGamelistOnly", parse_gamelists->getState()); });
|
||||
|
||||
auto local_art = std::make_shared<SwitchComponent>(mWindow);
|
||||
local_art->setState(Settings::getInstance()->getBool("LocalArt"));
|
||||
s->addWithLabel("SEARCH FOR LOCAL ART", local_art);
|
||||
s->addSaveFunc([local_art] { Settings::getInstance()->setBool("LocalArt", local_art->getState()); });
|
||||
|
||||
// hidden files
|
||||
auto hidden_files = std::make_shared<SwitchComponent>(mWindow);
|
||||
hidden_files->setState(Settings::getInstance()->getBool("ShowHiddenFiles"));
|
||||
|
|
|
@ -129,6 +129,8 @@ void Settings::setDefaults()
|
|||
mBoolMap["SortAllSystems"] = false;
|
||||
mBoolMap["UseCustomCollectionsSystem"] = true;
|
||||
|
||||
mBoolMap["LocalArt"] = false;
|
||||
|
||||
// Audio out device for volume control
|
||||
#ifdef _RPI_
|
||||
mStringMap["AudioDevice"] = "PCM";
|
||||
|
|
Loading…
Reference in a new issue