diff options
Diffstat (limited to 'Source/Core/VideoCommon/Assets/CustomTextureData.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/Assets/CustomTextureData.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/Assets/CustomTextureData.cpp b/Source/Core/VideoCommon/Assets/CustomTextureData.cpp index 23af429d11..d30532142a 100644 --- a/Source/Core/VideoCommon/Assets/CustomTextureData.cpp +++ b/Source/Core/VideoCommon/Assets/CustomTextureData.cpp @@ -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; |
