partly implement NtGdiDdReenableDirectDrawObject

this give us bit more closer getting hardware accalertions working. 

svn path=/trunk/; revision=25977
This commit is contained in:
Magnus Olsen 2007-03-03 20:19:56 +00:00
parent c44e8d2c89
commit 2c81a2df18
2 changed files with 53 additions and 10 deletions

View file

@ -462,7 +462,7 @@ NtGdiDdQueryDirectDrawObject(
return Ret;
}
/*
/*
* Get puD3dBufferCallbacks
*/
if (puD3dBufferCallbacks != NULL)
@ -540,6 +540,58 @@ NtGdiDdQueryDirectDrawObject(
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,

View file

@ -304,15 +304,6 @@ DWORD STDCALL NtGdiDdQueryMoCompStatus(
return 0;
}
BOOL STDCALL NtGdiDdReenableDirectDrawObject(
HANDLE hDirectDrawLocal,
BOOL *pubNewMode
)
{
UNIMPLEMENTED
return FALSE;
}
BOOL STDCALL NtGdiDdReleaseDC(
HANDLE hSurface