mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-18 15:15:37 +00:00
Added support for using the %ESPATH% and %ROMPATH% variables for the custom slideshow path.
This commit is contained in:
parent
c2f1ba0585
commit
bed6b24eeb
|
@ -495,6 +495,11 @@ void SystemScreensaver::generateCustomImageList()
|
|||
std::string imageDir = Utils::FileSystem::expandHomePath(
|
||||
Settings::getInstance()->getString("ScreensaverSlideshowImageDir"));
|
||||
|
||||
// This makes it possible to set the custom image directory relative to the ES-DE binary
|
||||
// directory or the ROM directory.
|
||||
imageDir = Utils::String::replace(imageDir, "%ESPATH%", Utils::FileSystem::getExePath());
|
||||
imageDir = Utils::String::replace(imageDir, "%ROMPATH%", FileData::getROMDirectory());
|
||||
|
||||
if (imageDir != "" && Utils::FileSystem::isDirectory(imageDir)) {
|
||||
std::string imageFilter = ".jpg, .JPG, .png, .PNG";
|
||||
Utils::FileSystem::stringList dirContent = Utils::FileSystem::getDirContent(
|
||||
|
|
Loading…
Reference in a new issue