PATCH: Initialize the DDCAPS structure of the DDRAW object

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch set the DDCAPS dwSize member of the DDRAW object.
This makes GetCaps to correctly copy (with DD_STRUCT_COPY_BYSIZE)
the strucure to the application.

Modified files :
dlls/ddraw/ddraw/hal.c

Changelog :
Initialize the DDCAPS structure of the DDRAW object at creation

Christian

Index: hal.c
===================================================================
RCS file: /home/wine/wine/dlls/ddraw/ddraw/hal.c,v
retrieving revision 1.6
diff -u -r1.6 hal.c
--- hal.c	31 May 2002 23:25:45 -0000	1.6
+++ hal.c	5 Aug 2002 13:25:52 -0000
@@ -391,6 +391,9 @@
      * CoCreateInstanced then Initialized. */
     This->private = (HAL_DirectDrawImpl *)(This+1);
 
+    /* Initialize the DDCAPS structure */
+    This->caps.dwSize = sizeof(This->caps);
+
     hr = HAL_DirectDraw_Construct(This, ex);
     if (FAILED(hr))
 	HeapFree(GetProcessHeap(), 0, This);
@@ -412,6 +415,9 @@
     This->private = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
 			      sizeof(HAL_DirectDrawImpl));
     if (This->private == NULL) return E_OUTOFMEMORY;
+
+    /* Initialize the DDCAPS structure */
+    This->caps.dwSize = sizeof(This->caps);
 
     hr = HAL_DirectDraw_Construct(This, TRUE); /* XXX ex? */
     if (FAILED(hr))

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux