[PATCH 1/3] ddraw: Size handling fixes for IDirect3DDevice::GetCaps (try 4)

Alexandre Julliard julliard at winehq.org
Fri Dec 2 10:25:20 CST 2011


stefan at codeweavers.com writes:

> +static inline BOOL check_d3ddevicedesc_size(DWORD size)
> +{
> +    if (size == 172 || size == 204 || size == sizeof(D3DDEVICEDESC) /* 252 */) return TRUE;
> +    return FALSE;
> +}

You should use something like FIELD_OFFSET instead of these magic
constants.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list