ddraw: Fix filtering of enumerated display modes by bits per pixel
Stefan Dösinger
stefandoesinger at gmx.at
Mon May 9 14:11:33 CDT 2011
On Monday 09 May 2011 20:55:21 Ričardas Barkauskas wrote:
> + modes16bpp_cnt = 0;
> + U2(ddsd.ddpfPixelFormat).dwRBitMask = 0x0000;
> + U3(ddsd.ddpfPixelFormat).dwGBitMask = 0x0000;
> + U4(ddsd.ddpfPixelFormat).dwBBitMask = 0x0000;
Please add an additional test that passes in non-null flags that don't match
standard R5G6B5.
> + if ((DDSD->dwFlags & DDSD_PIXELFORMAT) && (DDSD-
>u4.ddpfPixelFormat.dwFlags & DDPF_RGB) )
> + if(pixelformat.u1.dwRGBBitCount != DDSD-
>u4.ddpfPixelFormat.u1.dwRGBBitCount) continue;
For the fun of it you could see what happens when you pass a non-RGB
format(e.g. a DDPF_YUV or DDPF_BUMPDUDV one) to EnumPixelFormat, but that's
not really a requirement for me. Afaics the DDPF_RGB check is needed anyway to
enumerate 8 bit palettized formats properly.
A YUV primary format may even make sense. A BUMPDUDV one not really.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20110509/2968701e/attachment.pgp>
More information about the wine-devel
mailing list