Harmonized some screensaver options.

This commit is contained in:
Leon Styhre 2020-07-27 20:38:22 +02:00
parent 58ba42ed54
commit 9f0e587b1a
5 changed files with 13 additions and 13 deletions

View file

@ -112,7 +112,7 @@ void SystemScreenSaver::startScreenSaver()
mVideoScreensaver->setPosition(Renderer::getScreenWidth() / 2.0f,
Renderer::getScreenHeight() / 2.0f);
if (Settings::getInstance()->getBool("StretchVideoOnScreenSaver"))
if (Settings::getInstance()->getBool("ScreenSaverStretchVideos"))
mVideoScreensaver->setResize((float)Renderer::getScreenWidth(),
(float)Renderer::getScreenHeight());
else
@ -156,7 +156,7 @@ void SystemScreenSaver::startScreenSaver()
mImageScreensaver->setPosition(Renderer::getScreenWidth() / 2.0f,
Renderer::getScreenHeight() / 2.0f);
if (Settings::getInstance()->getBool("SlideshowScreenSaverStretch"))
if (Settings::getInstance()->getBool("ScreenSaverStretchImages"))
mImageScreensaver->setResize((float)Renderer::getScreenWidth(),
(float)Renderer::getScreenHeight());
else

View file

@ -32,10 +32,10 @@ GuiSlideshowScreensaverOptions::GuiSlideshowScreensaverOptions(Window* window, c
// Stretch image.
auto sss_stretch = std::make_shared<SwitchComponent>(mWindow);
sss_stretch->setState(Settings::getInstance()->getBool("SlideshowScreenSaverStretch"));
addWithLabel(row, "STRETCH IMAGES", sss_stretch);
sss_stretch->setState(Settings::getInstance()->getBool("ScreenSaverStretchImages"));
addWithLabel(row, "STRETCH IMAGES TO MONITOR RESOLUTION", sss_stretch);
addSaveFunc([sss_stretch] {
Settings::getInstance()->setBool("SlideshowScreenSaverStretch", sss_stretch->getState());
Settings::getInstance()->setBool("ScreenSaverStretchImages", sss_stretch->getState());
});
// Background audio file.

View file

@ -17,7 +17,7 @@ GuiVideoScreensaverOptions::GuiVideoScreensaverOptions(Window* window, const cha
: GuiScreensaverOptions(window, title)
{
// Timer for swapping videos.
auto swap = std::make_shared<SliderComponent>(mWindow, 10.f, 300.f, 5.f, "s");
auto swap = std::make_shared<SliderComponent>(mWindow, 1.f, 120.f, 1.f, "s");
swap->setValue((float)(Settings::getInstance()->
getInt("ScreenSaverSwapVideoTimeout") / (1000)));
addWithLabel("SWAP VIDEO AFTER (SECS)", swap);
@ -28,10 +28,10 @@ GuiVideoScreensaverOptions::GuiVideoScreensaverOptions(Window* window, const cha
});
auto stretch_screensaver = std::make_shared<SwitchComponent>(mWindow);
stretch_screensaver->setState(Settings::getInstance()->getBool("StretchVideoOnScreenSaver"));
addWithLabel("STRETCH VIDEO ON SCREENSAVER", stretch_screensaver);
stretch_screensaver->setState(Settings::getInstance()->getBool("ScreenSaverStretchVideos"));
addWithLabel("STRETCH VIDEOS TO MONITOR RESOLUTION", stretch_screensaver);
addSaveFunc([stretch_screensaver] { Settings::getInstance()->
setBool("StretchVideoOnScreenSaver", stretch_screensaver->getState()); });
setBool("ScreenSaverStretchVideos", stretch_screensaver->getState()); });
#ifdef _RPI_
auto ss_omx = std::make_shared<SwitchComponent>(mWindow);

View file

@ -97,14 +97,14 @@ void Settings::setDefaults()
mStringMap["ScreenSaverBehavior"] = "dim";
// UI settings -> screensaver settings -> video screensaver settings.
mIntMap["ScreenSaverSwapVideoTimeout"] = 30000;
mBoolMap["StretchVideoOnScreenSaver"] = false;
mIntMap["ScreenSaverSwapVideoTimeout"] = 20000;
mBoolMap["ScreenSaverStretchVideos"] = false;
mStringMap["ScreenSaverGameInfo"] = "never";
mBoolMap["ScreenSaverVideoMute"] = false; // Raspberry Pi only
// UI settings -> screensaver settings -> slideshow screensaver settings.
mIntMap["ScreenSaverSwapImageTimeout"] = 10000;
mBoolMap["SlideshowScreenSaverStretch"] = false;
mBoolMap["ScreenSaverStretchImages"] = false;
mStringMap["SlideshowScreenSaverBackgroundAudioFile"] = Utils::FileSystem::getHomePath() +
"/.emulationstation/slideshow/audio/slideshow_bg.wav";
mBoolMap["SlideshowScreenSaverCustomImageSource"] = false;

View file

@ -178,7 +178,7 @@ void VideoPlayerComponent::startVideo()
if (!subtitlePath.empty()) {
// If we are rendering a screensaver.
// Check if we want to stretch the image.
if (Settings::getInstance()->getBool("StretchVideoOnScreenSaver"))
if (Settings::getInstance()->getBool("ScreenSaverStretchVideos"))
argv[6] = "stretch";
if (Settings::getInstance()->getString("ScreenSaverGameInfo") != "never") {