mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-29 17:45:38 +00:00
Removed scaling and CaptionsCompatibility option for the video screensaver.
This commit is contained in:
parent
c906881957
commit
58ba42ed54
|
@ -43,8 +43,8 @@ GuiGeneralScreensaverOptions::GuiGeneralScreensaverOptions(Window* window, const
|
||||||
std::vector<std::string> screensavers;
|
std::vector<std::string> screensavers;
|
||||||
screensavers.push_back("dim");
|
screensavers.push_back("dim");
|
||||||
screensavers.push_back("black");
|
screensavers.push_back("black");
|
||||||
screensavers.push_back("random video");
|
|
||||||
screensavers.push_back("slideshow");
|
screensavers.push_back("slideshow");
|
||||||
|
screensavers.push_back("random video");
|
||||||
for (auto it = screensavers.cbegin(); it != screensavers.cend(); it++)
|
for (auto it = screensavers.cbegin(); it != screensavers.cend(); it++)
|
||||||
screensaver_behavior->add(*it, *it, Settings::getInstance()->
|
screensaver_behavior->add(*it, *it, Settings::getInstance()->
|
||||||
getString("ScreenSaverBehavior") == *it);
|
getString("ScreenSaverBehavior") == *it);
|
||||||
|
|
|
@ -104,14 +104,6 @@ GuiVideoScreensaverOptions::GuiVideoScreensaverOptions(Window* window, const cha
|
||||||
ss_omx_italic_font_file->getValue());
|
ss_omx_italic_font_file->getValue());
|
||||||
});
|
});
|
||||||
#endif
|
#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()
|
GuiVideoScreensaverOptions::~GuiVideoScreensaverOptions()
|
||||||
|
|
|
@ -101,7 +101,6 @@ void Settings::setDefaults()
|
||||||
mBoolMap["StretchVideoOnScreenSaver"] = false;
|
mBoolMap["StretchVideoOnScreenSaver"] = false;
|
||||||
mStringMap["ScreenSaverGameInfo"] = "never";
|
mStringMap["ScreenSaverGameInfo"] = "never";
|
||||||
mBoolMap["ScreenSaverVideoMute"] = false; // Raspberry Pi only
|
mBoolMap["ScreenSaverVideoMute"] = false; // Raspberry Pi only
|
||||||
mBoolMap["CaptionsCompatibility"] = true;
|
|
||||||
|
|
||||||
// UI settings -> screensaver settings -> slideshow screensaver settings.
|
// UI settings -> screensaver settings -> slideshow screensaver settings.
|
||||||
mIntMap["ScreenSaverSwapImageTimeout"] = 10000;
|
mIntMap["ScreenSaverSwapImageTimeout"] = 10000;
|
||||||
|
|
|
@ -299,25 +299,8 @@ void VideoVlcComponent::startVideo()
|
||||||
libvlc_media_tracks_release(tracks, track_count);
|
libvlc_media_tracks_release(tracks, track_count);
|
||||||
|
|
||||||
// Make sure we found a valid video track.
|
// Make sure we found a valid video track.
|
||||||
|
|
||||||
if ((mVideoWidth > 0) && (mVideoHeight > 0)) {
|
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();
|
PowerSaver::pause();
|
||||||
setupContext();
|
setupContext();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue