mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 22:25: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;
|
mFallbackScreensaver = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mFallbackScreensaver ||
|
if (mFallbackScreensaver ||
|
||||||
Settings::getInstance()->getString("ScreensaverType") == "black") {
|
Settings::getInstance()->getString("ScreensaverType") == "dim") {
|
||||||
#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") {
|
|
||||||
#if defined(USE_OPENGL_21)
|
#if defined(USE_OPENGL_21)
|
||||||
Renderer::shaderParameters dimParameters;
|
Renderer::shaderParameters dimParameters;
|
||||||
dimParameters.fragmentDimValue = mDimValue;
|
dimParameters.fragmentDimValue = mDimValue;
|
||||||
|
@ -413,6 +400,18 @@ void SystemScreensaver::renderScreensaver()
|
||||||
Renderer::getScreenHeight(), 0x000000A0, 0x000000A0);
|
Renderer::getScreenHeight(), 0x000000A0, 0x000000A0);
|
||||||
#endif
|
#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(),
|
mWindow->pushGui(new GuiMsgBox(mWindow, getHelpStyle(),
|
||||||
"THE 'VIDEO' SCREENSAVER SHOWS\nVIDEOS FROM YOUR GAMELISTS\n\n"
|
"THE 'VIDEO' SCREENSAVER SHOWS\nVIDEOS FROM YOUR GAMELISTS\n\n"
|
||||||
"IF YOU DO NOT HAVE ANY VIDEOS, THE\n"
|
"IF YOU DO NOT HAVE ANY VIDEOS, THE\n"
|
||||||
"SCREENSAVER WILL DEFAULT TO 'BLACK'",
|
"SCREENSAVER WILL DEFAULT TO 'DIM'",
|
||||||
"OK", [] { return; }, "", nullptr, "", nullptr));
|
"OK", [] { return; }, "", nullptr, "", nullptr));
|
||||||
}
|
}
|
||||||
Settings::getInstance()->setString("ScreensaverType",
|
Settings::getInstance()->setString("ScreensaverType",
|
||||||
|
|
|
@ -148,8 +148,8 @@ void Settings::setDefaults()
|
||||||
mBoolMap["MediaViewerScreenshotScanlines"] = { true, true };
|
mBoolMap["MediaViewerScreenshotScanlines"] = { true, true };
|
||||||
|
|
||||||
// UI settings -> screensaver settings.
|
// UI settings -> screensaver settings.
|
||||||
mIntMap["ScreensaverTimer"] = { 5*60*1000, 5*60*1000 }; // 5 minutes
|
mIntMap["ScreensaverTimer"] = { 5 * 60 * 1000, 5 * 60 * 1000 }; // 5 minutes.
|
||||||
mStringMap["ScreensaverType"] = { "dim", "dim" };
|
mStringMap["ScreensaverType"] = { "video", "video" };
|
||||||
mBoolMap["ScreensaverControls"] = { true, true };
|
mBoolMap["ScreensaverControls"] = { true, true };
|
||||||
|
|
||||||
// UI settings -> screensaver settings -> slideshow screensaver settings.
|
// UI settings -> screensaver settings -> slideshow screensaver settings.
|
||||||
|
|
Loading…
Reference in a new issue