From 958c97f7918dbe29ec04f9caf66e288a48d5472a Mon Sep 17 00:00:00 2001 From: Almamu Date: Thu, 14 Aug 2025 01:56:00 +0200 Subject: [PATCH] fix: parsing tex0004 --- src/WallpaperEngine/Assets/CTexture.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/WallpaperEngine/Assets/CTexture.cpp b/src/WallpaperEngine/Assets/CTexture.cpp index d55b01a..19ab50f 100644 --- a/src/WallpaperEngine/Assets/CTexture.cpp +++ b/src/WallpaperEngine/Assets/CTexture.cpp @@ -284,7 +284,7 @@ std::unique_ptr CTexture::parseHeader (const char* file header->freeImageFormat = static_cast (*pointer++); header->isVideoMp4 = *pointer++ == 1; - if (header->freeImageFormat == FIF_UNKNOWN) { + if (header->freeImageFormat == FIF_UNKNOWN && header->isVideoMp4) { header->freeImageFormat = FIF_MP4; } @@ -412,6 +412,8 @@ std::shared_ptr CTexture::parseMipmap (const TextureHea fileData ++; pointer = reinterpret_cast (fileData); + // this is another param to ignore + pointer++; } mipmap->width = *pointer++;