Christian Costa : d3dx9: Also check for a valid alpha channel for TGA images.
Module: wine Branch: master Commit: 46f08b169bc58f2ebb29f2bda843401bf2370930 URL: https://source.winehq.org/git/wine.git/?a=commit;h=46f08b169bc58f2ebb29f2bda... Author: Christian Costa <titan.costa(a)gmail.com> Date: Fri Dec 10 20:03:40 2021 +0100 d3dx9: Also check for a valid alpha channel for TGA images. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48631 Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dx9_36/surface.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c index 362113386ea..c3f9f84a789 100644 --- a/dlls/d3dx9_36/surface.c +++ b/dlls/d3dx9_36/surface.c @@ -895,7 +895,8 @@ static BOOL image_is_argb(IWICBitmapFrameDecode *frame, const D3DXIMAGE_INFO *in BYTE *buffer; HRESULT hr; - if (info->Format != D3DFMT_X8R8G8B8 || info->ImageFileFormat != D3DXIFF_BMP) + if (info->Format != D3DFMT_X8R8G8B8 || (info->ImageFileFormat != D3DXIFF_BMP + && info->ImageFileFormat != D3DXIFF_TGA)) return FALSE; size = info->Width * info->Height * 4;
participants (1)
-
Alexandre Julliard