From 17484770868554e9295fc2e9d71055c66a443e88 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 22 Aug 2023 22:12:34 +0200 Subject: [PATCH] - use FileData for readinf WebP --- src/common/textures/formats/webptexture.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/common/textures/formats/webptexture.cpp b/src/common/textures/formats/webptexture.cpp index dd9a9c388d..64cc46d086 100644 --- a/src/common/textures/formats/webptexture.cpp +++ b/src/common/textures/formats/webptexture.cpp @@ -124,8 +124,7 @@ PalettedPixels FWebPTexture::CreatePalettedPixels(int conversion) int FWebPTexture::CopyPixels(FBitmap *bmp, int conversion) { WebPDecoderConfig config; - auto lump = fileSystem.OpenFileReader(SourceLump); - auto bytes = lump.Read(); + auto bytes = fileSystem.ReadFile(SourceLump); if (WebPInitDecoderConfig(&config) == false) return 0; @@ -137,7 +136,7 @@ int FWebPTexture::CopyPixels(FBitmap *bmp, int conversion) config.output.u.RGBA.stride = bmp->GetPitch(); config.output.is_external_memory = 1; - (void)WebPDecode(bytes.data(), bytes.size(), &config); + (void)WebPDecode(bytes.GetBytes(), bytes.GetSize(), &config); return 0; }