wined3d: Get rid of the DDRAW_PITCH_ALIGNMENT and D3D8_PITCH_ALIGNMENT constants.

This commit is contained in:
Henri Verbeet 2013-08-29 10:26:24 +02:00 committed by Alexandre Julliard
parent 605136ab04
commit 43ecaf29c3
5 changed files with 6 additions and 12 deletions

View file

@ -1228,11 +1228,8 @@ static HRESULT WINAPI ddraw7_GetCaps(IDirectDraw7 *iface, DDCAPS *DriverCaps, DD
caps.dwSSBCKeyCaps = winecaps.ddraw_caps.ssb_color_key_caps;
caps.dwSSBFXCaps = winecaps.ddraw_caps.ssb_fx_caps;
if (winecaps.ddraw_caps.stride_align)
{
caps.dwCaps |= DDCAPS_ALIGNSTRIDE;
caps.dwAlignStrideAlign = winecaps.ddraw_caps.stride_align;
}
caps.dwCaps |= DDCAPS_ALIGNSTRIDE;
caps.dwAlignStrideAlign = DDRAW_STRIDE_ALIGNMENT;
if(DriverCaps)
{
@ -5276,9 +5273,8 @@ HRESULT ddraw_init(struct ddraw *ddraw, enum wined3d_device_type device_type)
ddraw->flags |= DDRAW_NO3D;
}
hr = wined3d_device_create(ddraw->wined3d, WINED3DADAPTER_DEFAULT, device_type,
NULL, 0, 8, &ddraw->device_parent, &ddraw->wined3d_device);
if (FAILED(hr))
if (FAILED(hr = wined3d_device_create(ddraw->wined3d, WINED3DADAPTER_DEFAULT, device_type,
NULL, 0, DDRAW_STRIDE_ALIGNMENT, &ddraw->device_parent, &ddraw->wined3d_device)))
{
WARN("Failed to create a wined3d device, hr %#x.\n", hr);
wined3d_decref(ddraw->wined3d);

View file

@ -55,6 +55,8 @@ struct FvfToDecl
#define DDRAW_NO3D 0x00000008
#define DDRAW_SCL_DDRAW1 0x00000010
#define DDRAW_STRIDE_ALIGNMENT 8
struct ddraw
{
/* Interfaces */

View file

@ -4657,7 +4657,6 @@ HRESULT CDECL wined3d_get_device_caps(const struct wined3d *wined3d, UINT adapte
WINEDDSCAPS_SYSTEMMEMORY |
WINEDDSCAPS_VIDEOMEMORY |
WINEDDSCAPS_VISIBLE;
caps->ddraw_caps.stride_align = DDRAW_PITCH_ALIGNMENT;
if (!(wined3d->flags & WINED3D_NO3D))
{

View file

@ -1886,8 +1886,6 @@ struct wined3d_device
BYTE fixed_function_usage_map; /* MAX_TEXTURES, 8 */
#define DDRAW_PITCH_ALIGNMENT 8
#define D3D8_PITCH_ALIGNMENT 4
unsigned char surface_alignment; /* Line Alignment of surfaces */
struct wined3d_state state;

View file

@ -1748,7 +1748,6 @@ struct wined3d_ddraw_caps
DWORD ssb_color_key_caps;
DWORD ssb_fx_caps;
DWORD dds_caps;
DWORD stride_align;
};
typedef struct _WINED3DCAPS