Changed the order of dialogs shown on application startup.

Also made the startup animation finish before the dialogs are displayed.
This commit is contained in:
Leon Styhre 2023-02-21 18:52:48 +01:00
parent 9683295c10
commit 53a29b8314
2 changed files with 28 additions and 28 deletions

View file

@ -750,16 +750,6 @@ int main(int argc, char* argv[])
}
}
// Check if any of the enabled systems have an invalid alternative emulator entry,
// which means that a label is present in the gamelist.xml file which is not matching
// any command tag in es_systems.xml.
for (auto system : SystemData::sSystemVector) {
if (system->getAlternativeEmulator().substr(0, 9) == "<INVALID>") {
ViewController::getInstance()->invalidAlternativeEmulatorDialog();
break;
}
}
// Don't generate controller events while we're loading.
SDL_GameControllerEventState(SDL_DISABLE);
@ -776,14 +766,17 @@ int main(int argc, char* argv[])
applicationUpdater->getResults(updaterResults);
#endif
}
// Open the input configuration GUI if the force flag was passed from the command line.
if (!loadSystemsStatus) {
if (forceInputConfig) {
window->pushGui(new GuiDetectDevice(
false, true, [] { ViewController::getInstance()->goToStart(true); }));
}
else {
ViewController::getInstance()->goToStart(true);
if (!loadSystemsStatus)
ViewController::getInstance()->goToStart(true);
// Check if any of the enabled systems have an invalid alternative emulator entry,
// which means that a label is present in the gamelist.xml file which is not matching
// any command tag in es_systems.xml.
for (auto system : SystemData::sSystemVector) {
if (system->getAlternativeEmulator().substr(0, 9) == "<INVALID>") {
ViewController::getInstance()->invalidAlternativeEmulatorDialog();
break;
}
}
@ -808,6 +801,12 @@ int main(int argc, char* argv[])
ViewController::getInstance()->updateAvailableDialog(updaterResults);
#endif
// Open the input configuration GUI if the force flag was passed from the command line.
if (forceInputConfig) {
ViewController::getInstance()->cancelViewTransitions();
window->pushGui(new GuiDetectDevice(false, true, nullptr));
}
// Main application loop.
if (!SystemData::sStartupExitSignal) {

View file

@ -65,7 +65,7 @@ void ViewController::invalidSystemsFileDialog()
"SOMETHING IS LIKELY WRONG WITH YOUR XML SYNTAX. "
"IF YOU DON'T HAVE A CUSTOM SYSTEMS FILE, THEN THE "
"EMULATIONSTATION INSTALLATION IS BROKEN. SEE THE "
"APPLICATION LOG FILE es_log.txt FOR ADDITIONAL INFO.";
"APPLICATION LOG FILE es_log.txt FOR ADDITIONAL INFO";
mWindow->pushGui(new GuiMsgBox(
HelpStyle(), errorMessage.c_str(), "QUIT",
@ -200,19 +200,20 @@ void ViewController::noGamesDialog()
void ViewController::invalidAlternativeEmulatorDialog()
{
mWindow->pushGui(new GuiMsgBox(getHelpStyle(), "AT LEAST ONE OF YOUR SYSTEMS HAS AN\n"
"INVALID ALTERNATIVE EMULATOR CONFIGURED\n"
"WITH NO MATCHING ENTRY IN THE SYSTEMS\n"
"CONFIGURATION FILE, PLEASE REVIEW YOUR\n"
"SETUP USING THE 'ALTERNATIVE EMULATORS'\n"
"INTERFACE IN THE 'OTHER SETTINGS' MENU"));
cancelViewTransitions();
mWindow->pushGui(new GuiMsgBox(getHelpStyle(),
"AT LEAST ONE OF YOUR SYSTEMS HAS AN\n"
"INVALID ALTERNATIVE EMULATOR CONFIGURED\n"
"WITH NO MATCHING ENTRY IN THE SYSTEMS\n"
"CONFIGURATION FILE, PLEASE REVIEW YOUR\n"
"SETUP USING THE 'ALTERNATIVE EMULATORS'\n"
"INTERFACE IN THE 'OTHER SETTINGS' MENU",
"OK", nullptr, "", nullptr, "", nullptr, true, true));
}
void ViewController::updateAvailableDialog(const std::string& message)
{
if (isAnimationPlaying(0))
finishAnimation(0);
cancelViewTransitions();
mWindow->pushGui(new GuiMsgBox(getHelpStyle(), message, "OK", nullptr, "", nullptr, "", nullptr,
true, true,
(mRenderer->getIsVerticalOrientation() ?