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@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Christian Costa 2021-12-10 20:03:40 +01:00 committed by Alexandre Julliard
parent 921bade0da
commit 46f08b169b
1 changed files with 2 additions and 1 deletions

View File

@ -895,7 +895,8 @@ static BOOL image_is_argb(IWICBitmapFrameDecode *frame, const D3DXIMAGE_INFO *in
BYTE *buffer; BYTE *buffer;
HRESULT hr; 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; return FALSE;
size = info->Width * info->Height * 4; size = info->Width * info->Height * 4;