ddraw fix for incorrect return value from wined3d take 3.

Yong Chi yong28chi at yahoo.com
Fri Aug 11 17:51:29 CDT 2006


The new test cases crashes under wine but not under
windows. The fix for test cases crash is to initialize
the vertexbuffer to NULL when unsuccessful.

This patch should be used rather then previous one.

thx

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-------------- next part --------------
Index: dlls/ddraw/direct3d.c
===================================================================
RCS file: /home/wine/wine/dlls/ddraw/direct3d.c,v
retrieving revision 1.9
diff -u -r1.9 direct3d.c
--- dlls/ddraw/direct3d.c	9 Aug 2006 11:04:37 -0000	1.9
+++ dlls/ddraw/direct3d.c	11 Aug 2006 22:47:16 -0000
@@ -992,8 +992,11 @@
     {
         ERR("(%p) IWineD3DDevice::CreateVertexBuffer failed with hr=%08lx\n", This, hr);
         HeapFree(GetProcessHeap(), 0, object);
+	*VertexBuffer = NULL;
         if (hr == WINED3DERR_INVALIDCALL)
             return DDERR_INVALIDPARAMS;
+	if (hr == WINED3DERR_OUTOFVIDEOMEMORY)
+	    return D3DERR_TOOMANYVERTICES;
         else
             return hr;
     }


More information about the wine-patches mailing list