[ros-diffs] [greatlrd] 31265: fix a check in createsurface do not accpect if both flag DDSCAPS_SYSTEMMEMORY and DDSCAPS_VIDEOMEMORY are set in pDDSD->ddsCaps

greatlrd at svn.reactos.org greatlrd at svn.reactos.org
Sun Dec 16 01:28:35 CET 2007


Author: greatlrd
Date: Sun Dec 16 03:28:35 2007
New Revision: 31265

URL: http://svn.reactos.org/svn/reactos?rev=31265&view=rev
Log:
fix a check in createsurface 
do not accpect if both flag DDSCAPS_SYSTEMMEMORY and DDSCAPS_VIDEOMEMORY are set in pDDSD->ddsCaps

Modified:
    trunk/reactos/dll/directx/ddraw/Surface/createsurface.c

Modified: trunk/reactos/dll/directx/ddraw/Surface/createsurface.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/Surface/createsurface.c?rev=31265&r1=31264&r2=31265&view=diff
==============================================================================
--- trunk/reactos/dll/directx/ddraw/Surface/createsurface.c (original)
+++ trunk/reactos/dll/directx/ddraw/Surface/createsurface.c Sun Dec 16 03:28:35 2007
@@ -58,6 +58,12 @@
         return DDERR_INVALIDOBJECT;
     }
 
+    if  ( ((pDDSD->ddsCaps.dwCaps & DDSCAPS_SYSTEMMEMORY) == DDSCAPS_SYSTEMMEMORY) &&
+          ((pDDSD->ddsCaps.dwCaps & DDSCAPS_VIDEOMEMORY) == DDSCAPS_VIDEOMEMORY) )
+    {
+        return DDERR_INVALIDCAPS;
+    }
+
     if(!(pDDSD->dwFlags & DDSD_HEIGHT) && !(pDDSD->dwFlags & DDSD_HEIGHT)
         && !(pDDSD->ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE))
     {




More information about the Ros-diffs mailing list