Stefan Dösinger : wined3d: Report the pitch alignment to ddraw.
Alexandre Julliard
julliard at winehq.org
Mon Aug 4 08:53:40 CDT 2008
Module: wine
Branch: master
Commit: 399825cd8e781723e30a5b0293e37f7872dabc37
URL: http://source.winehq.org/git/wine.git/?a=commit;h=399825cd8e781723e30a5b0293e37f7872dabc37
Author: Stefan Dösinger <stefan at codeweavers.com>
Date: Sat Aug 2 18:06:01 2008 -0500
wined3d: Report the pitch alignment to ddraw.
---
dlls/wined3d/directx.c | 6 +++---
dlls/wined3d/wined3d_private.h | 2 ++
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index ddb7102..9101ba8 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -3483,7 +3483,7 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter,
WINEDDSCAPS_SYSTEMMEMORY |
WINEDDSCAPS_VIDEOMEMORY |
WINEDDSCAPS_VISIBLE;
- pCaps->DirectDrawCaps.StrideAlign = 0; /* TODO: SURFACE_ALIGNMENT */
+ pCaps->DirectDrawCaps.StrideAlign = DDRAW_PITCH_ALIGNMENT;
/* Set D3D caps if OpenGL is available. */
if(Adapters[Adapter].opengl) {
@@ -3535,9 +3535,9 @@ static HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter,
list_init(&object->shaders);
if(This->dxVersion == 7) {
- object->surface_alignment = 8;
+ object->surface_alignment = DDRAW_PITCH_ALIGNMENT;
} else {
- object->surface_alignment = 4;
+ object->surface_alignment = D3D8_PITCH_ALIGNMENT;
}
object->posFixup[0] = 1.0; /* This is needed to get the x coord unmodified through a MAD */
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 453c92a..0e798c1 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -835,6 +835,8 @@ struct IWineD3DDeviceImpl
BOOL view_ident; /* true iff view matrix is identity */
BOOL untransformed;
BOOL vertexBlendUsed; /* To avoid needless setting of the blend matrices */
+#define DDRAW_PITCH_ALIGNMENT 8
+#define D3D8_PITCH_ALIGNMENT 4
unsigned char surface_alignment; /* Line Alignment of surfaces */
/* State block related */
More information about the wine-cvs
mailing list