mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05:38 +00:00
Fixed an issue where the gamelist view would sometimes not render after changing collection settings.
Also fixed some other glitches with the cached background not getting invalidated on collection changes.
This commit is contained in:
parent
0329bd77c2
commit
918ffd9b9e
|
@ -89,6 +89,7 @@ GuiCollectionSystemsOptions::GuiCollectionSystemsOptions(std::string title)
|
|||
setNeedsSaving();
|
||||
setNeedsReloading();
|
||||
setNeedsCollectionsUpdate();
|
||||
setInvalidateCachedBackground();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -144,6 +145,7 @@ GuiCollectionSystemsOptions::GuiCollectionSystemsOptions(std::string title)
|
|||
setNeedsReloading();
|
||||
setNeedsCollectionsUpdate();
|
||||
setNeedsGoToGroupedCollections();
|
||||
setInvalidateCachedBackground();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -137,6 +137,9 @@ void GuiSettings::save()
|
|||
if (state.getSystem()->isCollection() &&
|
||||
state.getSystem()->getThemeFolder() != "custom-collections") {
|
||||
ViewController::getInstance()->goToStart(false);
|
||||
ViewController::getInstance()->resetCamera();
|
||||
SDL_Delay(100);
|
||||
mWindow->invalidateCachedBackground();
|
||||
ViewController::getInstance()->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.
|
||||
|
@ -147,8 +150,12 @@ void GuiSettings::save()
|
|||
if (std::find(SystemData::sSystemVector.begin(), SystemData::sSystemVector.end(),
|
||||
state.getSystem()) == SystemData::sSystemVector.end()) {
|
||||
ViewController::getInstance()->goToStart(false);
|
||||
ViewController::getInstance()->resetCamera();
|
||||
SDL_Delay(100);
|
||||
mWindow->invalidateCachedBackground();
|
||||
return;
|
||||
}
|
||||
ViewController::getInstance()->resetCamera();
|
||||
}
|
||||
|
||||
if (mInvalidateCachedBackground) {
|
||||
|
|
|
@ -65,6 +65,13 @@ public:
|
|||
bool isCameraMoving();
|
||||
void cancelViewTransitions();
|
||||
void stopScrolling();
|
||||
void resetCamera()
|
||||
{
|
||||
if (mCurrentView != nullptr) {
|
||||
mCamera[3].x = -mCurrentView->getPosition().x;
|
||||
mCamera[3].y = -mCurrentView->getPosition().y;
|
||||
}
|
||||
}
|
||||
|
||||
// Basic video controls.
|
||||
void startViewVideos() override { mCurrentView->startViewVideos(); }
|
||||
|
|
Loading…
Reference in a new issue