[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: [3/3] d3dx9: Implement conversion from DDS pixel format to D3DFORMAT.
From:       Matteo Bruni <matteo.mystral () gmail ! com>
Date:       2012-04-26 10:48:31
Message-ID: CABvNrtNs_JUHDFG7FwtrZs8URcbCYcEA21dxCVfy+776JHG5Xw () mail ! gmail ! com
[Download RAW message or body]

Il 26 aprile 2012 11:47, J=F3zef Kucia <joseph.kucia@gmail.com> ha scritto:
> =A0static D3DFORMAT dds_pixel_format_to_d3dformat(const struct dds_pixel_=
format *pixel_format)
> =A0{
> - =A0 =A0FIXME("Pixel format conversion not implemented.\n");
> + =A0 =A0if (pixel_format->flags & DDS_PF_FOURCC)
> + =A0 =A0 =A0 =A0return dds_fourcc_to_d3dformat(pixel_format->fourcc);
> + =A0 =A0else if (pixel_format->flags & DDS_PF_RGB)
> + =A0 =A0 =A0 =A0return dds_rgb_to_d3dformat(pixel_format);
> + =A0 =A0else if (pixel_format->flags & DDS_PF_LUMINANCE)
> + =A0 =A0 =A0 =A0return dds_luminance_to_d3dformat(pixel_format);
> + =A0 =A0else if (pixel_format->flags & DDS_PF_ALPHA_ONLY)
> + =A0 =A0 =A0 =A0return dds_alpha_to_d3dformat(pixel_format);

You don't need all those 'else's, the 'return's imply that you get
there only when the 'if' condition isn't true.
The same applies in other areas of this patch.

I don't mind much, but since you have to resend the series anyway...


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic