mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-31 04:25:40 +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);
|
CollectionSystemsManager::get()->refreshCollectionSystems(file, true);
|
||||||
|
|
||||||
file->getSystem()->sortSystem();
|
file->getSystem()->sortSystem();
|
||||||
// This small delay keeps the theme extras from sometimes not being rendered while
|
// This delay reduces the likelyhood that the SVG rasterizer which is running in a
|
||||||
// the background cache is invalidated. Very strange, it must be some kind of race
|
// separate thread is not done until the cached background is invalidated. Without
|
||||||
// condition or similar.
|
// this delay there's a high chance that some theme elements are not rendered in
|
||||||
SDL_Delay(10);
|
// 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();
|
mWindow->invalidateCachedBackground();
|
||||||
|
|
||||||
// Remove the folder entry from the gamelist.xml file.
|
// Remove the folder entry from the gamelist.xml file.
|
||||||
|
|
|
@ -136,6 +136,12 @@ void GuiSettings::save()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mDoNotInvalidateCachedBackground) {
|
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 ||
|
if (mNeedsSaving || mNeedsCollectionsUpdate || mNeedsReloading || mNeedsSorting ||
|
||||||
mNeedsGoToStart || mNeedsGoToSystem)
|
mNeedsGoToStart || mNeedsGoToSystem)
|
||||||
mWindow->invalidateCachedBackground();
|
mWindow->invalidateCachedBackground();
|
||||||
|
|
Loading…
Reference in a new issue