From 2bae4951050ea2281bc2f5abbd4b1e309304fe99 Mon Sep 17 00:00:00 2001 From: Magnus Olsen Date: Sun, 16 Dec 2007 00:38:22 +0000 Subject: [PATCH] fix another bug in createsurface a program does not need set the flag DDSD_LPSURFACE, if they forget ddraw will automatic set it. svn path=/trunk/; revision=31266 --- reactos/dll/directx/ddraw/Surface/createsurface.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/reactos/dll/directx/ddraw/Surface/createsurface.c b/reactos/dll/directx/ddraw/Surface/createsurface.c index 691c209102a..0fb0f904e04 100644 --- a/reactos/dll/directx/ddraw/Surface/createsurface.c +++ b/reactos/dll/directx/ddraw/Surface/createsurface.c @@ -76,6 +76,16 @@ Internal_CreateSurface( LPDDRAWI_DIRECTDRAW_INT pDDraw, LPDDSURFACEDESC2 pDDSD, return DDERR_INVALIDPARAMS; } + /* + * program does not need set the DDSD_LPSURFACE, + * if they forget set it, the ddraw will autoamtic set it. + * + */ + if ((pDDSD->dwFlags & DDSD_LPSURFACE) != DDSD_LPSURFACE) + { + pDDSD->dwFlags = pDDSD->dwFlags | DDSD_LPSURFACE; + } + /* FIXME count our how many surface we need */ DxHeapMemAlloc(slist_int, num_of_surf * sizeof( LPDDRAWI_DDRAWSURFACE_INT ) );