Fix release build uninitialized
Implemet NtGdiDdAddAttachedSurface untested
Modified: trunk/reactos/subsys/win32k/ntddraw/ddraw.c
Modified: trunk/reactos/subsys/win32k/ntddraw/stubs.c
_____
Modified: trunk/reactos/subsys/win32k/ntddraw/ddraw.c
--- trunk/reactos/subsys/win32k/ntddraw/ddraw.c 2005-10-07 21:30:33 UTC
(rev 18314)
+++ trunk/reactos/subsys/win32k/ntddraw/ddraw.c 2005-10-07 21:48:12 UTC
(rev 18315)
@@ -328,7 +328,7 @@
BOOL bRealDestroy
)
{
- DWORD ddRVal;
+ DWORD ddRVal = DDHAL_DRIVER_NOTHANDLED;
PDD_DIRECTDRAW pDirectDraw = GDIOBJ_LockObj(hSurface,
GDI_OBJECT_TYPE_DIRECTDRAW);
if (pDirectDraw == NULL)
@@ -391,10 +391,9 @@
return ddRVal;
}
-
-DWORD STDCALL NtGdiDdSetColorKey(
+DWORD STDCALL NtGdiDdUnlock(
HANDLE hSurface,
- PDD_SETCOLORKEYDATA puSetColorKeyData
+ PDD_UNLOCKDATA puUnlockData
)
{
DWORD ddRVal;
@@ -403,13 +402,13 @@
if (pDirectDraw == NULL)
return DDHAL_DRIVER_NOTHANDLED;
- if (!(pDirectDraw->Surf.dwFlags & DDHAL_SURFCB32_SETCOLORKEY))
+ if (!(pDirectDraw->Surf.dwFlags & DDHAL_SURFCB32_UNLOCK))
ddRVal = DDHAL_DRIVER_NOTHANDLED;
else
- ddRVal = pDirectDraw->Surf.SetColorKey(puSetColorKeyData);
+ ddRVal = pDirectDraw->Surf.Unlock(puUnlockData);
- GDIOBJ_UnlockObjByPtr(pDirectDraw);
- return ddRVal;
+ GDIOBJ_UnlockObjByPtr(pDirectDraw);
+ return ddRVal;
}
DWORD STDCALL NtGdiDdBlt(
@@ -430,52 +429,75 @@
ddRVal = pDirectDraw->Surf.Blt(puBltData);
GDIOBJ_UnlockObjByPtr(pDirectDraw);
-
return ddRVal;
}
-DWORD STDCALL NtGdiDdUpdateOverlay(
- HANDLE hSurfaceDestination,
- HANDLE hSurfaceSource,
- PDD_UPDATEOVERLAYDATA puUpdateOverlayData
+DWORD STDCALL NtGdiDdSetColorKey(
+ HANDLE hSurface,
+ PDD_SETCOLORKEYDATA puSetColorKeyData
)
{
DWORD ddRVal;
- PDD_DIRECTDRAW pDirectDraw = GDIOBJ_LockObj(hSurfaceDestination,
GDI_OBJECT_TYPE_DIRECTDRAW);
+ PDD_DIRECTDRAW pDirectDraw = GDIOBJ_LockObj(hSurface,
GDI_OBJECT_TYPE_DIRECTDRAW);
if (pDirectDraw == NULL)
return DDHAL_DRIVER_NOTHANDLED;
- if (!(pDirectDraw->Surf.dwFlags & DDHAL_SURFCB32_UPDATEOVERLAY))
+ if (!(pDirectDraw->Surf.dwFlags & DDHAL_SURFCB32_SETCOLORKEY))
ddRVal = DDHAL_DRIVER_NOTHANDLED;
else
- ddRVal = pDirectDraw->Surf.UpdateOverlay(puUpdateOverlayData);
+ ddRVal = pDirectDraw->Surf.SetColorKey(puSetColorKeyData);
GDIOBJ_UnlockObjByPtr(pDirectDraw);
- return ddRVal;
+ return ddRVal;
}
-DWORD STDCALL NtGdiDdUnlock(
+
+DWORD STDCALL NtGdiDdAddAttachedSurface(
HANDLE hSurface,
- PDD_UNLOCKDATA puUnlockData
+ HANDLE hSurfaceAttached,
+ PDD_ADDATTACHEDSURFACEDATA puAddAttachedSurfaceData
)
{
DWORD ddRVal;
- PDD_DIRECTDRAW pDirectDraw = GDIOBJ_LockObj(hSurface,
GDI_OBJECT_TYPE_DIRECTDRAW);
+ PDD_DIRECTDRAW pDirectDraw = GDIOBJ_LockObj(hSurfaceAttached,
GDI_OBJECT_TYPE_DIRECTDRAW);
if (pDirectDraw == NULL)
return DDHAL_DRIVER_NOTHANDLED;
+ if (!(pDirectDraw->Surf.dwFlags &
DDHAL_SURFCB32_ADDATTACHEDSURFACE))
+ ddRVal = DDHAL_DRIVER_NOTHANDLED;
+ else
+ ddRVal =
pDirectDraw->Surf.AddAttachedSurface(puAddAttachedSurfaceData);
+
+ GDIOBJ_UnlockObjByPtr(pDirectDraw);
+ return ddRVal;
+}
+
+
+DWORD STDCALL NtGdiDdUpdateOverlay(
+ HANDLE hSurfaceDestination,
+ HANDLE hSurfaceSource,
+ PDD_UPDATEOVERLAYDATA puUpdateOverlayData
+)
+{
+ DWORD ddRVal;
+
+ PDD_DIRECTDRAW pDirectDraw = GDIOBJ_LockObj(hSurfaceDestination,
GDI_OBJECT_TYPE_DIRECTDRAW);
+ if (pDirectDraw == NULL)
+ return DDHAL_DRIVER_NOTHANDLED;
+
if (!(pDirectDraw->Surf.dwFlags & DDHAL_SURFCB32_UPDATEOVERLAY))
ddRVal = DDHAL_DRIVER_NOTHANDLED;
else
- ddRVal = pDirectDraw->Surf.Unlock(puUnlockData);
+ ddRVal = pDirectDraw->Surf.UpdateOverlay(puUpdateOverlayData);
- GDIOBJ_UnlockObjByPtr(pDirectDraw);
- return ddRVal;
+ GDIOBJ_UnlockObjByPtr(pDirectDraw);
+ return ddRVal;
}
+
/***********************************************************************
*/
/* SURFACE OBJECT
*/
/***********************************************************************
*/
_____
Modified: trunk/reactos/subsys/win32k/ntddraw/stubs.c
--- trunk/reactos/subsys/win32k/ntddraw/stubs.c 2005-10-07 21:30:33 UTC
(rev 18314)
+++ trunk/reactos/subsys/win32k/ntddraw/stubs.c 2005-10-07 21:48:12 UTC
(rev 18315)
@@ -69,16 +69,7 @@
return 0;
}
-DWORD STDCALL NtGdiDdAddAttachedSurface(
- HANDLE hSurface,
- HANDLE hSurfaceAttached,
- PDD_ADDATTACHEDSURFACEDATA puAddAttachedSurfaceData
-)
-{
- UNIMPLEMENTED
- return 0;
-}
Show replies by date