mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-18 15:15:37 +00:00
Hack to fix some missing theme elements when invalidating the cached background.
This commit is contained in:
parent
980a23d083
commit
4b0f505b01
|
@ -371,10 +371,12 @@ void GuiGamelistOptions::openMetaDataEd()
|
|||
CollectionSystemsManager::get()->refreshCollectionSystems(file, true);
|
||||
|
||||
file->getSystem()->sortSystem();
|
||||
// This small delay keeps the theme extras from sometimes not being rendered while
|
||||
// the background cache is invalidated. Very strange, it must be some kind of race
|
||||
// condition or similar.
|
||||
SDL_Delay(10);
|
||||
// This delay reduces the likelyhood that the SVG rasterizer which is running in a
|
||||
// separate thread is not done until the cached background is invalidated. Without
|
||||
// this delay there's a high chance that some theme elements are not rendered in
|
||||
// time and thus not getting included in the regenerated cached background.
|
||||
// This is just a hack though and a better mechanism is needed to handle this.
|
||||
SDL_Delay(100);
|
||||
mWindow->invalidateCachedBackground();
|
||||
|
||||
// Remove the folder entry from the gamelist.xml file.
|
||||
|
|
|
@ -136,6 +136,12 @@ void GuiSettings::save()
|
|||
}
|
||||
|
||||
if (!mDoNotInvalidateCachedBackground) {
|
||||
// This delay reduces the likelyhood that the SVG rasterizer which is running in a
|
||||
// separate thread is not done until the cached background is invalidated. Without
|
||||
// this delay there's a high chance that some theme elements are not rendered in
|
||||
// time and thus not getting included in the regenerated cached background.
|
||||
// This is just a hack though and a better mechanism is needed to handle this.
|
||||
SDL_Delay(100);
|
||||
if (mNeedsSaving || mNeedsCollectionsUpdate || mNeedsReloading || mNeedsSorting ||
|
||||
mNeedsGoToStart || mNeedsGoToSystem)
|
||||
mWindow->invalidateCachedBackground();
|
||||
|
|
Loading…
Reference in a new issue