Re: [1/5] ddraw: Simplify Z format parsing a bit, remove ERRs
On 1 September 2011 11:01, Stefan Dösinger <stefan(a)codeweavers.com> wrote:
case 32: if(DDPixelFormat->u2.dwStencilBitDepth == 8) return WINED3DFMT_D24_UNORM_S8_UINT; - else + else if (DDPixelFormat->u2.dwStencilBitDepth == 4) return WINED3DFMT_S4X4_UINT_D24_UNORM;
I'm not sure if this is intentional or not, but you fallthrough to the default case here. If that's intentional, a /* Fallthrough */ or similar comment wouldn't hurt. On the other hand, you do explicitly handle it in the no-stencil case.
On Thursday 01 September 2011 13:27:28 Henri Verbeet wrote:
On 1 September 2011 11:01, Stefan Dösinger <stefan(a)codeweavers.com> wrote:
case 32: if(DDPixelFormat->u2.dwStencilBitDepth == 8)
return WINED3DFMT_D24_UNORM_S8_UINT;
- else + else if (DDPixelFormat->u2.dwStencilBitDepth == 4)
return WINED3DFMT_S4X4_UINT_D24_UNORM;
I'm not sure if this is intentional or not, but you fallthrough to the default case here. It was intentional, but you're right that it is inconsistent.
participants (2)
-
Henri Verbeet -
Stefan Dösinger