mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-04-10 19:15:13 +00:00
Added an option to completely disable the game launch screen
This commit is contained in:
parent
b8c7369ad9
commit
eccf485d6d
|
|
@ -779,6 +779,7 @@ void GuiMenu::openUIOptions()
|
|||
launchScreenDuration->add(_("NORMAL"), "normal", selectedDuration == "normal");
|
||||
launchScreenDuration->add(_("BRIEF"), "brief", selectedDuration == "brief");
|
||||
launchScreenDuration->add(_("LONG"), "long", selectedDuration == "long");
|
||||
launchScreenDuration->add(_("POPUP"), "popup", selectedDuration == "popup");
|
||||
launchScreenDuration->add(_("DISABLED"), "disabled", selectedDuration == "disabled");
|
||||
// If there are no objects returned, then there must be a manually modified entry in the
|
||||
// configuration file. Simply set the duration to "normal" in this case.
|
||||
|
|
|
|||
|
|
@ -1022,11 +1022,10 @@ void ViewController::launch(FileData* game)
|
|||
mWindow->stopInfoPopup(); // Make sure we disable any existing info popup.
|
||||
|
||||
int duration {0};
|
||||
std::string durationString {Settings::getInstance()->getString("LaunchScreenDuration")};
|
||||
const std::string durationString {Settings::getInstance()->getString("LaunchScreenDuration")};
|
||||
|
||||
if (durationString == "disabled") {
|
||||
// If the game launch screen has been set as disabled, show a simple info popup
|
||||
// notification instead.
|
||||
if (durationString == "popup") {
|
||||
// Show a simple info popup notification instead of the launch screen.
|
||||
mWindow->queueInfoPopup(
|
||||
Utils::String::format(_("LAUNCHING GAME '%s'"),
|
||||
Utils::String::toUpper(game->metadata.get("name")).c_str()),
|
||||
|
|
@ -1039,12 +1038,15 @@ void ViewController::launch(FileData* game)
|
|||
else if (durationString == "long") {
|
||||
duration = 4500;
|
||||
}
|
||||
else if (durationString == "disabled") {
|
||||
duration = 0;
|
||||
}
|
||||
else {
|
||||
// Normal duration.
|
||||
duration = 3000;
|
||||
}
|
||||
|
||||
if (durationString != "disabled")
|
||||
if (durationString != "disabled" && durationString != "popup")
|
||||
mWindow->displayLaunchScreen(game->getSourceFileData());
|
||||
|
||||
NavigationSounds::getInstance().playThemeNavigationSound(LAUNCHSOUND);
|
||||
|
|
|
|||
Loading…
Reference in a new issue