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

View file

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

View file

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

View file

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

View file

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