From 270378414e72c6f69b5dcc591ebe8a61730b7cf6 Mon Sep 17 00:00:00 2001 From: wraitii Date: Wed, 9 Jun 2021 13:50:57 +0000 Subject: [PATCH] Uncompress cached DDS in mouse event mask. Reported by: langbart Differential Revision: https://code.wildfiregames.com/D4142 This was SVN commit r25759. --- source/gui/SettingTypes/MouseEventMask.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/gui/SettingTypes/MouseEventMask.cpp b/source/gui/SettingTypes/MouseEventMask.cpp index a95343fcb7..53b52d7ac2 100644 --- a/source/gui/SettingTypes/MouseEventMask.cpp +++ b/source/gui/SettingTypes/MouseEventMask.cpp @@ -106,6 +106,12 @@ public: LOGERROR("Could not decode mouse event mask texture '%s'", spec); return nullptr; } + if (tex.transform(TEX_DXT | TEX_MIPMAPS) != INFO::OK) + { + LOGERROR("Could not transform texture '%s'", spec); + return nullptr; + } + // TODO > would be nice to downscale, maybe. if (tex.m_Width == 0 || tex.m_Height == 0) { @@ -124,6 +130,7 @@ public: else mask->m_Data.push_back(*ptr > 0); } + return mask; }