mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-03-06 14:27:43 +00:00
Fixed an issue where animations would play incorrectly when disabling a collection.
This commit is contained in:
parent
fad326c3bd
commit
79849188d1
|
@ -97,7 +97,7 @@ void GuiSettings::save()
|
|||
ViewController::get()->reloadAll();
|
||||
|
||||
if (mNeedsGoToStart)
|
||||
ViewController::get()->goToStart();
|
||||
ViewController::get()->goToStart(true);
|
||||
|
||||
if (mNeedsGoToSystem)
|
||||
ViewController::get()->goToSystem(mGoToSystem, false);
|
||||
|
@ -124,7 +124,7 @@ void GuiSettings::save()
|
|||
// the safe side.
|
||||
if (state.getSystem()->isCollection() &&
|
||||
state.getSystem()->getThemeFolder() != "custom-collections") {
|
||||
ViewController::get()->goToStart();
|
||||
ViewController::get()->goToStart(false);
|
||||
ViewController::get()->goToSystem(SystemData::sSystemVector.front(), false);
|
||||
// We don't want to invalidate the cached background when there has been a collection
|
||||
// systen change as that may show a black screen in some circumstances.
|
||||
|
@ -134,7 +134,7 @@ void GuiSettings::save()
|
|||
// system view).
|
||||
if (std::find(SystemData::sSystemVector.begin(), SystemData::sSystemVector.end(),
|
||||
state.getSystem()) == SystemData::sSystemVector.end()) {
|
||||
ViewController::get()->goToStart();
|
||||
ViewController::get()->goToStart(false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -636,10 +636,10 @@ int main(int argc, char* argv[])
|
|||
if (!loadSystemsStatus) {
|
||||
if (forceInputConfig) {
|
||||
window.pushGui(new GuiDetectDevice(&window, false, true,
|
||||
[] { ViewController::get()->goToStart(); }));
|
||||
[] { ViewController::get()->goToStart(true); }));
|
||||
}
|
||||
else {
|
||||
ViewController::get()->goToStart();
|
||||
ViewController::get()->goToStart(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -236,7 +236,7 @@ void ViewController::invalidAlternativeEmulatorDialog()
|
|||
"INTERFACE IN THE 'OTHER SETTINGS' MENU"));
|
||||
}
|
||||
|
||||
void ViewController::goToStart()
|
||||
void ViewController::goToStart(bool playTransition)
|
||||
{
|
||||
// If the system view does not exist, then create it. We do this here as it would
|
||||
// otherwise not be done if jumping directly into a specific game system on startup.
|
||||
|
@ -250,6 +250,8 @@ void ViewController::goToStart()
|
|||
it != SystemData::sSystemVector.cend(); it++) {
|
||||
if ((*it)->getName() == requestedSystem) {
|
||||
goToGameList(*it);
|
||||
if (!playTransition)
|
||||
cancelViewTransitions();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -624,7 +626,7 @@ void ViewController::playViewTransition(bool instant)
|
|||
fadeCallback, true);
|
||||
});
|
||||
|
||||
// Fast-forward animation if we're partway faded.
|
||||
// Fast-forward animation if we're partially faded.
|
||||
if (target == static_cast<glm::vec3>(-mCamera[3])) {
|
||||
// Not changing screens, so cancel the first half entirely.
|
||||
advanceAnimation(0, FADE_DURATION);
|
||||
|
|
|
@ -60,7 +60,7 @@ public:
|
|||
void goToGameList(SystemData* system);
|
||||
void goToSystemView(SystemData* system, bool playTransition);
|
||||
void goToSystem(SystemData* system, bool animate);
|
||||
void goToStart();
|
||||
void goToStart(bool playTransition);
|
||||
void ReloadAndGoToStart();
|
||||
|
||||
// Functions to make the GUI behave properly.
|
||||
|
|
Loading…
Reference in a new issue