mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 14:15:38 +00:00
Made 'dim' the fallback screensaver instead of 'black'.
Also set the default screensaver type to 'video' instead of 'dim'.
This commit is contained in:
parent
bf39f10381
commit
4fd0423b07
|
@ -383,21 +383,8 @@ void SystemScreensaver::renderScreensaver()
|
|||
mFallbackScreensaver = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (mFallbackScreensaver ||
|
||||
Settings::getInstance()->getString("ScreensaverType") == "black") {
|
||||
#if defined(USE_OPENGL_21)
|
||||
Renderer::shaderParameters blackParameters;
|
||||
blackParameters.fragmentDimValue = mDimValue;
|
||||
Renderer::shaderPostprocessing(Renderer::SHADER_DIM, blackParameters);
|
||||
if (mDimValue > 0.0)
|
||||
mDimValue = Math::clamp(mDimValue - 0.045f, 0.0f, 1.0f);
|
||||
#else
|
||||
Renderer::drawRect(0.0f, 0.0f, Renderer::getScreenWidth(),
|
||||
Renderer::getScreenHeight(), 0x000000FF, 0x000000FF);
|
||||
#endif
|
||||
}
|
||||
else if (Settings::getInstance()->getString("ScreensaverType") == "dim") {
|
||||
Settings::getInstance()->getString("ScreensaverType") == "dim") {
|
||||
#if defined(USE_OPENGL_21)
|
||||
Renderer::shaderParameters dimParameters;
|
||||
dimParameters.fragmentDimValue = mDimValue;
|
||||
|
@ -413,6 +400,18 @@ void SystemScreensaver::renderScreensaver()
|
|||
Renderer::getScreenHeight(), 0x000000A0, 0x000000A0);
|
||||
#endif
|
||||
}
|
||||
else if (Settings::getInstance()->getString("ScreensaverType") == "black") {
|
||||
#if defined(USE_OPENGL_21)
|
||||
Renderer::shaderParameters blackParameters;
|
||||
blackParameters.fragmentDimValue = mDimValue;
|
||||
Renderer::shaderPostprocessing(Renderer::SHADER_DIM, blackParameters);
|
||||
if (mDimValue > 0.0)
|
||||
mDimValue = Math::clamp(mDimValue - 0.045f, 0.0f, 1.0f);
|
||||
#else
|
||||
Renderer::drawRect(0.0f, 0.0f, Renderer::getScreenWidth(),
|
||||
Renderer::getScreenHeight(), 0x000000FF, 0x000000FF);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ GuiScreensaverOptions::GuiScreensaverOptions(Window* window, const std::string&
|
|||
mWindow->pushGui(new GuiMsgBox(mWindow, getHelpStyle(),
|
||||
"THE 'VIDEO' SCREENSAVER SHOWS\nVIDEOS FROM YOUR GAMELISTS\n\n"
|
||||
"IF YOU DO NOT HAVE ANY VIDEOS, THE\n"
|
||||
"SCREENSAVER WILL DEFAULT TO 'BLACK'",
|
||||
"SCREENSAVER WILL DEFAULT TO 'DIM'",
|
||||
"OK", [] { return; }, "", nullptr, "", nullptr));
|
||||
}
|
||||
Settings::getInstance()->setString("ScreensaverType",
|
||||
|
|
|
@ -148,8 +148,8 @@ void Settings::setDefaults()
|
|||
mBoolMap["MediaViewerScreenshotScanlines"] = { true, true };
|
||||
|
||||
// UI settings -> screensaver settings.
|
||||
mIntMap["ScreensaverTimer"] = { 5*60*1000, 5*60*1000 }; // 5 minutes
|
||||
mStringMap["ScreensaverType"] = { "dim", "dim" };
|
||||
mIntMap["ScreensaverTimer"] = { 5 * 60 * 1000, 5 * 60 * 1000 }; // 5 minutes.
|
||||
mStringMap["ScreensaverType"] = { "video", "video" };
|
||||
mBoolMap["ScreensaverControls"] = { true, true };
|
||||
|
||||
// UI settings -> screensaver settings -> slideshow screensaver settings.
|
||||
|
|
Loading…
Reference in a new issue