Removed scaling and CaptionsCompatibility option for the video screensaver.

This commit is contained in:
Leon Styhre 2020-07-27 20:20:58 +02:00
parent c906881957
commit 58ba42ed54
4 changed files with 2 additions and 28 deletions

View file

@ -43,8 +43,8 @@ GuiGeneralScreensaverOptions::GuiGeneralScreensaverOptions(Window* window, const
std::vector<std::string> screensavers;
screensavers.push_back("dim");
screensavers.push_back("black");
screensavers.push_back("random video");
screensavers.push_back("slideshow");
screensavers.push_back("random video");
for (auto it = screensavers.cbegin(); it != screensavers.cend(); it++)
screensaver_behavior->add(*it, *it, Settings::getInstance()->
getString("ScreenSaverBehavior") == *it);

View file

@ -104,14 +104,6 @@ GuiVideoScreensaverOptions::GuiVideoScreensaverOptions(Window* window, const cha
ss_omx_italic_font_file->getValue());
});
#endif
#ifndef _RPI_
auto captions_compatibility = std::make_shared<SwitchComponent>(mWindow);
captions_compatibility->setState(Settings::getInstance()->getBool("CaptionsCompatibility"));
addWithLabel("USE COMPATIBLE LOW RESOLUTION FOR CAPTIONS", captions_compatibility);
addSaveFunc([captions_compatibility] { Settings::getInstance()->
setBool("CaptionsCompatibility", captions_compatibility->getState()); });
#endif
}
GuiVideoScreensaverOptions::~GuiVideoScreensaverOptions()

View file

@ -101,7 +101,6 @@ void Settings::setDefaults()
mBoolMap["StretchVideoOnScreenSaver"] = false;
mStringMap["ScreenSaverGameInfo"] = "never";
mBoolMap["ScreenSaverVideoMute"] = false; // Raspberry Pi only
mBoolMap["CaptionsCompatibility"] = true;
// UI settings -> screensaver settings -> slideshow screensaver settings.
mIntMap["ScreenSaverSwapImageTimeout"] = 10000;

View file

@ -299,25 +299,8 @@ void VideoVlcComponent::startVideo()
libvlc_media_tracks_release(tracks, track_count);
// Make sure we found a valid video track.
if ((mVideoWidth > 0) && (mVideoHeight > 0)) {
#ifndef _RPI_
if (mScreensaverMode) {
if (!Settings::getInstance()->getBool("CaptionsCompatibility")) {
Vector2f resizeScale((Renderer::getScreenWidth() / (float)mVideoWidth),
(Renderer::getScreenHeight() / (float)mVideoHeight));
if (resizeScale.x() < resizeScale.y()) {
mVideoWidth = (unsigned int) (mVideoWidth * resizeScale.x());
mVideoHeight = (unsigned int) (mVideoHeight * resizeScale.x());
}
else {
mVideoWidth = (unsigned int) (mVideoWidth * resizeScale.y());
mVideoHeight = (unsigned int) (mVideoHeight * resizeScale.y());
}
}
}
#endif
PowerSaver::pause();
setupContext();