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. 

svn path=/trunk/; revision=26945
This commit is contained in:
Magnus Olsen 2007-05-30 18:26:56 +00:00
parent e8318db301
commit 07306934a8

View file

@ -104,10 +104,26 @@ Main_DirectDraw_Initialize (LPDIRECTDRAW7 iface, LPGUID lpGUID)
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