mirror of
https://github.com/reactos/reactos.git
synced 2024-10-01 06:57:08 +00:00
rewrite lite of Create_DirectDraw and add reenble options.
svn path=/trunk/; revision=27206
This commit is contained in:
parent
e0e7446ed1
commit
6eae3cd5e1
|
@ -53,7 +53,7 @@ DirectDrawCreate (LPGUID lpGUID,
|
|||
}
|
||||
else
|
||||
{
|
||||
retVal = Create_DirectDraw (lpGUID, (LPDIRECTDRAW*)lplpDD, &IID_IDirectDraw, TRUE);
|
||||
retVal = Create_DirectDraw (lpGUID, (LPDIRECTDRAW*)lplpDD, &IID_IDirectDraw, FALSE);
|
||||
}
|
||||
}
|
||||
_SEH_HANDLE
|
||||
|
@ -97,7 +97,7 @@ DirectDrawCreateEx(LPGUID lpGUID,
|
|||
}
|
||||
else
|
||||
{
|
||||
retVal = Create_DirectDraw (lpGUID, (LPDIRECTDRAW*)lplpDD, id, TRUE);
|
||||
retVal = Create_DirectDraw (lpGUID, (LPDIRECTDRAW*)lplpDD, id, FALSE);
|
||||
}
|
||||
|
||||
/* Create our DirectDraw interface */
|
||||
|
|
|
@ -20,7 +20,7 @@ WNDCLASSW wnd_class;
|
|||
|
||||
HRESULT WINAPI
|
||||
Create_DirectDraw (LPGUID pGUID, LPDIRECTDRAW* pIface,
|
||||
REFIID id, BOOL ex)
|
||||
REFIID id, BOOL reenable)
|
||||
{
|
||||
LPDDRAWI_DIRECTDRAW_INT This;
|
||||
|
||||
|
@ -101,7 +101,39 @@ Create_DirectDraw (LPGUID pGUID, LPDIRECTDRAW* pIface,
|
|||
*pIface = (LPDIRECTDRAW)This;
|
||||
|
||||
/* Get right interface we whant */
|
||||
if (Main_DirectDraw_QueryInterface((LPDIRECTDRAW7)This, id, (void**)&pIface) == DD_OK)
|
||||
|
||||
This->lpVtbl = 0;
|
||||
if (IsEqualGUID(&IID_IDirectDraw7, id))
|
||||
{
|
||||
/* DirectDraw7 Vtable */
|
||||
This->lpVtbl = &DirectDraw7_Vtable;
|
||||
This->lpLcl->dwLocalFlags = This->lpLcl->dwLocalFlags + DDRAWILCL_DIRECTDRAW7;
|
||||
*pIface = (LPDIRECTDRAW)&This->lpVtbl;
|
||||
Main_DirectDraw_AddRef((LPDIRECTDRAW7)This);
|
||||
}
|
||||
else if (IsEqualGUID(&IID_IDirectDraw4, id))
|
||||
{
|
||||
/* DirectDraw4 Vtable */
|
||||
This->lpVtbl = &DirectDraw4_Vtable;
|
||||
*pIface = (LPDIRECTDRAW)&This->lpVtbl;
|
||||
Main_DirectDraw_AddRef((LPDIRECTDRAW7)This);
|
||||
}
|
||||
else if (IsEqualGUID(&IID_IDirectDraw2, id))
|
||||
{
|
||||
/* DirectDraw2 Vtable */
|
||||
This->lpVtbl = &DirectDraw2_Vtable;
|
||||
*pIface = (LPDIRECTDRAW)&This->lpVtbl;
|
||||
Main_DirectDraw_AddRef((LPDIRECTDRAW7)This);
|
||||
}
|
||||
else if (IsEqualGUID(&IID_IDirectDraw, id))
|
||||
{
|
||||
/* DirectDraw4 Vtable */
|
||||
This->lpVtbl = &DirectDraw_Vtable;
|
||||
*pIface = (LPDIRECTDRAW)&This->lpVtbl;
|
||||
Main_DirectDraw_AddRef((LPDIRECTDRAW7)This);
|
||||
}
|
||||
|
||||
if ( This->lpVtbl != 0)
|
||||
{
|
||||
DX_STUB_str("Got iface\n");
|
||||
|
||||
|
|
Loading…
Reference in a new issue