mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Refactored Achievement Badges into Texture Layers
Achievement badges/icons are refactored into the type CustomTextureData::ArraySlice::Level as that is the data type images loaded from the filesystem will be. This includes everything that uses the badges in the Qt UI and OnScreenDisplay, and similarly removes the OSD::Icon type because Level already contains that information.
This commit is contained in:
@ -574,6 +574,14 @@ bool LoadPNGTexture(CustomTextureData::ArraySlice::Level* level, const std::stri
|
||||
std::vector<u8> buffer(file.GetSize());
|
||||
file.ReadBytes(buffer.data(), file.GetSize());
|
||||
|
||||
return LoadPNGTexture(level, buffer);
|
||||
}
|
||||
|
||||
bool LoadPNGTexture(CustomTextureData::ArraySlice::Level* level, const std::vector<u8>& buffer)
|
||||
{
|
||||
if (!level) [[unlikely]]
|
||||
return false;
|
||||
|
||||
if (!Common::LoadPNG(buffer, &level->data, &level->width, &level->height))
|
||||
return false;
|
||||
|
||||
|
Reference in New Issue
Block a user