Author: greatlrd
Date: Sat Mar 3 23:19:56 2007
New Revision: 25977
URL:
http://svn.reactos.org/svn/reactos?rev=25977&view=rev
Log:
partly implement NtGdiDdReenableDirectDrawObject
this give us bit more closer getting hardware accalertions working.
Modified:
trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c
trunk/reactos/subsystems/win32/win32k/ntddraw/stubs.c
Modified: trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c (original)
+++ trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c Sat Mar 3 23:19:56 2007
@@ -462,7 +462,7 @@
return Ret;
}
- /*
+ /*
* Get puD3dBufferCallbacks
*/
if (puD3dBufferCallbacks != NULL)
@@ -540,6 +540,58 @@
return Ret;
}
+BOOL STDCALL NtGdiDdReenableDirectDrawObject(
+ HANDLE hDirectDrawLocal,
+ BOOL *pubNewMode
+)
+{
+ BOOL Ret=FALSE;
+ NTSTATUS Status = FALSE;
+ PDD_DIRECTDRAW pDirectDraw;
+
+ if (hDirectDrawLocal == NULL)
+ {
+ return Ret;
+ }
+
+ pDirectDraw = GDIOBJ_LockObj(DdHandleTable, hDirectDrawLocal,
+ GDI_OBJECT_TYPE_DIRECTDRAW);
+
+ if (!pDirectDraw)
+ {
+ return Ret;
+ }
+
+ /*
+ * FIXME detect mode change thic code maybe are not correct
+ * if we call on intEnableDriver it will cause some memory leak
+ * we need free the alloc memory before we call on it
+ */
+ Ret = intEnableDriver(pDirectDraw);
+
+ _SEH_TRY
+ {
+ ProbeForWrite(pubNewMode, sizeof(BOOL), 1);
+ *pubNewMode = Ret;
+ }
+ _SEH_HANDLE
+ {
+ Status = _SEH_GetExceptionCode();
+ }
+ _SEH_END;
+ if(!NT_SUCCESS(Status))
+ {
+ SetLastNtError(Status);
+ return Ret;
+ }
+
+ GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw);
+
+ return Ret;
+
+}
+
+
DWORD STDCALL NtGdiDdGetDriverInfo(
HANDLE hDirectDrawLocal,
Modified: trunk/reactos/subsystems/win32/win32k/ntddraw/stubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntddraw/stubs.c (original)
+++ trunk/reactos/subsystems/win32/win32k/ntddraw/stubs.c Sat Mar 3 23:19:56 2007
@@ -304,15 +304,6 @@
return 0;
}
-BOOL STDCALL NtGdiDdReenableDirectDrawObject(
- HANDLE hDirectDrawLocal,
- BOOL *pubNewMode
-)
-{
- UNIMPLEMENTED
-
- return FALSE;
-}
BOOL STDCALL NtGdiDdReleaseDC(
HANDLE hSurface