mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-17 22:55:38 +00:00
Set forceloading of all images for the startup system to avoid texture pop-in.
This commit is contained in:
parent
c50f39dd05
commit
d2641d5c2c
|
@ -104,6 +104,9 @@ void GamelistView::onThemeChanged(const std::shared_ptr<ThemeData>& theme)
|
|||
return;
|
||||
}
|
||||
|
||||
const bool isStartupSystem {Settings::getInstance()->getString("StartupSystem") ==
|
||||
mRoot->getSystem()->getName()};
|
||||
|
||||
using namespace ThemeFlags;
|
||||
|
||||
if (mTheme->hasView("gamelist")) {
|
||||
|
@ -169,7 +172,11 @@ void GamelistView::onThemeChanged(const std::shared_ptr<ThemeData>& theme)
|
|||
addChild(mPrimary);
|
||||
}
|
||||
if (element.second.type == "image") {
|
||||
mImageComponents.push_back(std::make_unique<ImageComponent>());
|
||||
// If this is the startup system, then forceload the images to avoid texture pop-in.
|
||||
if (isStartupSystem)
|
||||
mImageComponents.push_back(std::make_unique<ImageComponent>(true));
|
||||
else
|
||||
mImageComponents.push_back(std::make_unique<ImageComponent>());
|
||||
mImageComponents.back()->setDefaultZIndex(30.0f);
|
||||
mImageComponents.back()->applyTheme(theme, "gamelist", element.first, ALL);
|
||||
if (mImageComponents.back()->getThemeImageTypes().size() != 0)
|
||||
|
|
|
@ -472,7 +472,15 @@ void SystemView::populate()
|
|||
}
|
||||
}
|
||||
else if (element.second.type == "image") {
|
||||
elements.imageComponents.emplace_back(std::make_unique<ImageComponent>());
|
||||
// If this is the first system, then forceload the images to avoid texture
|
||||
// pop-in.
|
||||
if (it == SystemData::sSystemVector.front())
|
||||
elements.imageComponents.emplace_back(
|
||||
std::make_unique<ImageComponent>(true));
|
||||
else
|
||||
elements.imageComponents.emplace_back(
|
||||
std::make_unique<ImageComponent>());
|
||||
|
||||
elements.imageComponents.back()->setDefaultZIndex(30.0f);
|
||||
elements.imageComponents.back()->applyTheme(theme, "system", element.first,
|
||||
ThemeFlags::ALL);
|
||||
|
|
Loading…
Reference in a new issue