mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 07:35: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);
|
||||
if (pathLookup == ICON_PATH_MAP.cend()) {
|
||||
LOG(LogError) << "Unknown help icon \"" << name << "\"!";
|
||||
LOG(LogError) << "Unknown help icon \"" << name << "\"";
|
||||
return nullptr;
|
||||
}
|
||||
if (!ResourceManager::getInstance()->fileExists(pathLookup->second)) {
|
||||
LOG(LogError) << "Help icon \"" << name <<
|
||||
"\" - corresponding image file \"" << pathLookup->second << "\" misisng!";
|
||||
LOG(LogError) << "Couldn't load help icon \"" << name <<
|
||||
"\" as the file \"" << pathLookup->second << "\" is missing";
|
||||
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;
|
||||
return tex;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue