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/…
==============================================================================
--- 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))
{