Author: greatlrd
Date: Sat May 12 22:33:28 2007
New Revision: 26737
URL:
http://svn.reactos.org/svn/reactos?rev=26737&view=rev
Log:
fixing smaller bugs
Modified:
trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_main.c
trunk/reactos/dll/directx/ddraw/Surface/createsurface.c
Modified: trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/Ddraw/dd…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_main.c (original)
+++ trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_main.c Sat May 12 22:33:28 2007
@@ -130,10 +130,13 @@
DX_WINDBG_trace();
+ /* FIXME vaildate input pointers or warp everthing with SEH */
+
if (pUnkOuter)
- return DDERR_GENERIC;
-
- /* FIXME vaildate input pointers or warp everthing with SEH */
+ {
+ /* FIXME send back right return code */
+ return DDERR_GENERIC;
+ }
EnterCriticalSection(&ddcs);
@@ -164,12 +167,20 @@
return DDERR_INVALIDPARAMS;
}
- /* FIXME add one gbl check with one pDDSD check */
- ret = Internal_CreateSurface(dd_int,ppSurf,&dd_desc_v2);
+ /* check if this process belong to this ddraw */
+ if ( dd_int->lcl->dwProcessId != GetCurrentProcessId() )
+ {
+ /* FIXME send back right return code */
+ return DDERR_GENERIC;
+ }
+
+ ret = internal_CreateSurface(dd_int,dd_desc_v2,ppSurf,pUnkOuter);
LeaveCriticalSection(&ddcs);
return ret;
}
+
+
IDirectDraw7Vtbl DirectDraw7_Vtable =
{
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 Sat May 12 22:33:28 2007
@@ -21,6 +21,7 @@
{
RtlZeroMemory(dst_pDesc,sizeof(DDSURFACEDESC2));
RtlCopyMemory(dst_pDesc,src_pDesc,sizeof(DDSURFACEDESC));
+ dst_pDesc->dwSize = sizeof(DDSURFACEDESC2);
}