mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-29 01:25:38 +00:00
Changed to static loading of the help icons to avoid texture pop-in.
Also cleaned up some error logging for the help icon loading.
This commit is contained in:
parent
f3321009fe
commit
0243b4bcf8
|
@ -121,16 +121,17 @@ std::shared_ptr<TextureResource> HelpComponent::getIconTexture(const char* name)
|
||||||
|
|
||||||
auto pathLookup = ICON_PATH_MAP.find(name);
|
auto pathLookup = ICON_PATH_MAP.find(name);
|
||||||
if (pathLookup == ICON_PATH_MAP.cend()) {
|
if (pathLookup == ICON_PATH_MAP.cend()) {
|
||||||
LOG(LogError) << "Unknown help icon \"" << name << "\"!";
|
LOG(LogError) << "Unknown help icon \"" << name << "\"";
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
if (!ResourceManager::getInstance()->fileExists(pathLookup->second)) {
|
if (!ResourceManager::getInstance()->fileExists(pathLookup->second)) {
|
||||||
LOG(LogError) << "Help icon \"" << name <<
|
LOG(LogError) << "Couldn't load help icon \"" << name <<
|
||||||
"\" - corresponding image file \"" << pathLookup->second << "\" misisng!";
|
"\" as the file \"" << pathLookup->second << "\" is missing";
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<TextureResource> tex = TextureResource::get(pathLookup->second);
|
std::shared_ptr<TextureResource> tex =
|
||||||
|
TextureResource::get(pathLookup->second, false, false, false);
|
||||||
mIconCache[std::string(name)] = tex;
|
mIconCache[std::string(name)] = tex;
|
||||||
return tex;
|
return tex;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue