Author: greatlrd
Date: Wed May 30 22:26:56 2007
New Revision: 26945
URL: http://svn.reactos.org/svn/reactos?rev=26945&view=rev
Log:
implement Main_DirectDraw_Compact with same behvoir as ms DirectDraw_Compact does
in msdn it say it is unimplement and always return DD_OK, but the true is it can
return DDERR_NOEXCLUSIVEMODE when we have a exlusive mode set.
Modified:
trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_main.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 Wed May 30 22:26:56 2007
@@ -104,10 +104,26 @@
return DDERR_ALREADYINITIALIZED;
}
+/*
+ * Main_DirectDraw_Compact
+ * ms say this one is not implement but it return DDERR_NOEXCLUSIVEMODE
+ * when no exclusive owner are set in corpativelevel
+ */
HRESULT WINAPI
Main_DirectDraw_Compact(LPDIRECTDRAW7 iface)
{
- return DD_OK; // not implemented in ms ddraw either
+ HRESULT retVal = DD_OK;
+ LPDDRAWI_DIRECTDRAW_INT This = (LPDDRAWI_DIRECTDRAW_INT) iface;
+
+ DX_WINDBG_trace();
+ // EnterCriticalSection(&ddcs);
+
+ if (This->lpLcl->lpGbl->lpExclusiveOwner == This->lpLcl)
+ {
+ retVal = DDERR_NOEXCLUSIVEMODE;
+ }
+ // LeaveCriticalSection(&ddcs);
+ return retVal;
}
HRESULT WINAPI