mirror of
https://github.com/reactos/reactos.git
synced 2024-07-11 07:05:12 +00:00
add support for IID_IDirectDrawColorControl, IsEqualGUID(&IID_IDirectDrawGammaControl, IID_IDirectDrawSurfaceKernel
we are getting thues stubs api now from ddraw vtable now when some calls to surface_QueryInterface api svn path=/trunk/; revision=31188
This commit is contained in:
parent
d684b6f677
commit
37b2f521e1
|
@ -59,14 +59,13 @@ ULONG WINAPI Main_DDrawSurface_AddRef(LPDDRAWI_DDRAWSURFACE_INT iface)
|
|||
}
|
||||
|
||||
HRESULT WINAPI
|
||||
Main_DDrawSurface_QueryInterface(LPDDRAWI_DDRAWSURFACE_INT iface, REFIID riid,
|
||||
LPVOID* ppObj)
|
||||
Main_DDrawSurface_QueryInterface(LPDDRAWI_DDRAWSURFACE_INT This, REFIID riid, LPVOID* ppObj)
|
||||
{
|
||||
LPDDRAWI_DDRAWSURFACE_INT This = (LPDDRAWI_DDRAWSURFACE_INT)iface;
|
||||
DX_WINDBG_trace();
|
||||
HRESULT retVal = DD_OK;
|
||||
*ppObj = NULL;
|
||||
|
||||
|
||||
_SEH_TRY
|
||||
{
|
||||
if (IsEqualGUID(&IID_IDirectDrawSurface7, riid))
|
||||
|
@ -144,6 +143,51 @@ Main_DDrawSurface_QueryInterface(LPDDRAWI_DDRAWSURFACE_INT iface, REFIID riid,
|
|||
*ppObj = This;
|
||||
Main_DDrawSurface_AddRef(This);
|
||||
}
|
||||
else if (IsEqualGUID(&IID_IDirectDrawColorControl, riid))
|
||||
{
|
||||
if (This->lpVtbl != &DirectDrawSurface_Vtable)
|
||||
{
|
||||
This = internal_directdrawsurface_int_alloc(This);
|
||||
if (!This)
|
||||
{
|
||||
retVal = DDERR_OUTOFVIDEOMEMORY;
|
||||
_SEH_LEAVE;
|
||||
}
|
||||
}
|
||||
This->lpVtbl = &DirectDrawColorControl_Vtable;
|
||||
*ppObj = This;
|
||||
Main_DDrawSurface_AddRef(This);
|
||||
}
|
||||
else if (IsEqualGUID(&IID_IDirectDrawGammaControl, riid))
|
||||
{
|
||||
if (This->lpVtbl != &DirectDrawSurface_Vtable)
|
||||
{
|
||||
This = internal_directdrawsurface_int_alloc(This);
|
||||
if (!This)
|
||||
{
|
||||
retVal = DDERR_OUTOFVIDEOMEMORY;
|
||||
_SEH_LEAVE;
|
||||
}
|
||||
}
|
||||
This->lpVtbl = &DirectDrawGammaControl_Vtable;
|
||||
*ppObj = This;
|
||||
Main_DDrawSurface_AddRef(This);
|
||||
}
|
||||
else if (IsEqualGUID(&IID_IDirectDrawSurfaceKernel, riid))
|
||||
{
|
||||
if (This->lpVtbl != &DirectDrawSurface_Vtable)
|
||||
{
|
||||
This = internal_directdrawsurface_int_alloc(This);
|
||||
if (!This)
|
||||
{
|
||||
retVal = DDERR_OUTOFVIDEOMEMORY;
|
||||
_SEH_LEAVE;
|
||||
}
|
||||
}
|
||||
This->lpVtbl = &DirectDrawSurfaceKernel_Vtable;
|
||||
*ppObj = This;
|
||||
Main_DDrawSurface_AddRef(This);
|
||||
}
|
||||
else
|
||||
{
|
||||
DX_STUB_str("E_NOINTERFACE");
|
||||
|
|
Loading…
Reference in a new issue