mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-15 06:04:49 +01:00
tweak QueryInterface
This commit is contained in:
parent
f0522b6cce
commit
e5dffb454b
@ -8,6 +8,9 @@
|
||||
#include "ddraw.h"
|
||||
|
||||
|
||||
DEFINE_GUID(IID_IDirectDrawSurface4, 0x0B2B8630, 0xAD35, 0x11D0, 0x8E, 0xA6, 0x00, 0x60, 0x97, 0x97, 0xEA, 0x5B);
|
||||
DEFINE_GUID(IID_IDirectDrawSurface7, 0x06675a80, 0x3b9b, 0x11d2, 0xb9, 0x2f, 0x00, 0x60, 0x97, 0x97, 0xea, 0x5b);
|
||||
|
||||
struct IDirectDrawSurfaceImpl;
|
||||
struct IDirectDrawSurfaceImplVtbl;
|
||||
|
||||
|
@ -13,7 +13,21 @@ HRESULT __stdcall IDirectDrawSurface__QueryInterface(IDirectDrawSurfaceImpl *Thi
|
||||
|
||||
if (riid)
|
||||
{
|
||||
if (IsEqualGUID(&IID_IDirectDrawGammaControl, riid))
|
||||
if (IsEqualGUID(&IID_IDirectDrawSurface, riid) ||
|
||||
IsEqualGUID(&IID_IDirectDrawSurface2, riid) ||
|
||||
IsEqualGUID(&IID_IDirectDrawSurface3, riid) ||
|
||||
IsEqualGUID(&IID_IDirectDrawSurface4, riid) ||
|
||||
IsEqualGUID(&IID_IDirectDrawSurface7, riid))
|
||||
{
|
||||
dprintf(" GUID = %08X (IID_IDirectDrawSurfaceX)\n", ((GUID*)riid)->Data1);
|
||||
|
||||
IDirectDrawSurface_AddRef(This);
|
||||
|
||||
*obj = This;
|
||||
|
||||
ret = S_OK;
|
||||
}
|
||||
else if (IsEqualGUID(&IID_IDirectDrawGammaControl, riid))
|
||||
{
|
||||
IDirectDrawGammaControlImpl* gc = (IDirectDrawGammaControlImpl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectDrawGammaControlImpl));
|
||||
|
||||
@ -26,19 +40,11 @@ HRESULT __stdcall IDirectDrawSurface__QueryInterface(IDirectDrawSurfaceImpl *Thi
|
||||
|
||||
ret = S_OK;
|
||||
}
|
||||
else if (!IsEqualGUID(&IID_IDirectDrawSurface, riid))
|
||||
{
|
||||
dprintf(" GUID = %08X\n", ((GUID*)riid)->Data1);
|
||||
|
||||
IDirectDrawSurface_AddRef(This);
|
||||
|
||||
*obj = This;
|
||||
}
|
||||
else
|
||||
{
|
||||
dprintf(" GUID = %08X\n", ((GUID*)riid)->Data1);
|
||||
dprintf("NOT_IMPLEMENTED GUID = %08X\n", ((GUID*)riid)->Data1);
|
||||
|
||||
*obj = This;
|
||||
ret = E_NOINTERFACE;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user