Re: [PATCH 1/5] ddraw: Only ddraw7 disallows SetPalette on sublevels.
On 24 April 2014 12:10, Stefan Dösinger <stefan(a)codeweavers.com> wrote:
- if (!(surface->surface_desc.u4.ddpfPixelFormat.dwFlags & (DDPF_PALETTEINDEXED1 | DDPF_PALETTEINDEXED2 - | DDPF_PALETTEINDEXED4 | DDPF_PALETTEINDEXED8 | DDPF_PALETTEINDEXEDTO8))) - return DDERR_INVALIDPIXELFORMAT; - if (surface->surface_desc.ddsCaps.dwCaps2 & DDSCAPS2_MIPMAPSUBLEVEL) return DDERR_NOTONMIPMAPSUBLEVEL;
Note that this inverts the ordering of the pixel format and sub-level validation. That might even be correct, but the associated test doesn't cover that case at all.
Good point, I'll extend the test 2014-04-24 13:25 GMT+02:00 Henri Verbeet <hverbeet(a)gmail.com>:
On 24 April 2014 12:10, Stefan Dösinger <stefan(a)codeweavers.com> wrote:
- if (!(surface->surface_desc.u4.ddpfPixelFormat.dwFlags & (DDPF_PALETTEINDEXED1 | DDPF_PALETTEINDEXED2 - | DDPF_PALETTEINDEXED4 | DDPF_PALETTEINDEXED8 | DDPF_PALETTEINDEXEDTO8))) - return DDERR_INVALIDPIXELFORMAT; - if (surface->surface_desc.ddsCaps.dwCaps2 & DDSCAPS2_MIPMAPSUBLEVEL) return DDERR_NOTONMIPMAPSUBLEVEL;
Note that this inverts the ordering of the pixel format and sub-level validation. That might even be correct, but the associated test doesn't cover that case at all.
participants (2)
-
Henri Verbeet -
Stefan Dösinger