Henri Verbeet : wined3d: Get rid of the DDRAW_PITCH_ALIGNMENT and D3D8_PITCH_ALIGNMENT constants.

Alexandre Julliard julliard at winehq.org
Thu Aug 29 13:18:14 CDT 2013


Module: wine
Branch: master
Commit: 43ecaf29c39b71eb3f7d3a13a8eb6d0138bb84b8
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=43ecaf29c39b71eb3f7d3a13a8eb6d0138bb84b8

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Thu Aug 29 10:26:24 2013 +0200

wined3d: Get rid of the DDRAW_PITCH_ALIGNMENT and D3D8_PITCH_ALIGNMENT constants.

---

 dlls/ddraw/ddraw.c             |   12 ++++--------
 dlls/ddraw/ddraw_private.h     |    2 ++
 dlls/wined3d/directx.c         |    1 -
 dlls/wined3d/wined3d_private.h |    2 --
 include/wine/wined3d.h         |    1 -
 5 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
index aac1b5a..420c400 100644
--- a/dlls/ddraw/ddraw.c
+++ b/dlls/ddraw/ddraw.c
@@ -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);
diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h
index 84f90c4..299d6ca 100644
--- a/dlls/ddraw/ddraw_private.h
+++ b/dlls/ddraw/ddraw_private.h
@@ -55,6 +55,8 @@ struct FvfToDecl
 #define DDRAW_NO3D              0x00000008
 #define DDRAW_SCL_DDRAW1        0x00000010
 
+#define DDRAW_STRIDE_ALIGNMENT  8
+
 struct ddraw
 {
     /* Interfaces */
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 1e4dc6d..e235043 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -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))
     {
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index ee90b67..76f6888 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -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;
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index ff6cfbe..bf4b392 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -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




More information about the wine-cvs mailing list