addref fix
This commit is contained in:
parent
8ba6185965
commit
d68cb86430
1 changed files with 17 additions and 12 deletions
29
src/main.c
29
src/main.c
|
@ -1176,18 +1176,6 @@ HRESULT __stdcall ddraw_WaitForVerticalBlank(IDirectDrawImpl *This, DWORD a, HAN
|
|||
return DD_OK;
|
||||
}
|
||||
|
||||
HRESULT __stdcall ddraw_QueryInterface(IDirectDrawImpl *This, REFIID riid, void **obj)
|
||||
{
|
||||
printf("DirectDraw::QueryInterface(This=%p, riid=%08X, obj=%p)\n", This, (unsigned int)riid, obj);
|
||||
|
||||
if (riid && !IsEqualGUID(&IID_IDirectDraw, riid))
|
||||
This->lpVtbl->SetDisplayMode2 = ddraw_SetDisplayMode2;
|
||||
|
||||
*obj = This;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
ULONG __stdcall ddraw_AddRef(IDirectDrawImpl *This)
|
||||
{
|
||||
printf("DirectDraw::AddRef(This=%p)\n", This);
|
||||
|
@ -1197,6 +1185,23 @@ ULONG __stdcall ddraw_AddRef(IDirectDrawImpl *This)
|
|||
return This->Ref;
|
||||
}
|
||||
|
||||
HRESULT __stdcall ddraw_QueryInterface(IDirectDrawImpl *This, REFIID riid, void **obj)
|
||||
{
|
||||
printf("DirectDraw::QueryInterface(This=%p, riid=%08X, obj=%p)\n", This, (unsigned int)riid, obj);
|
||||
|
||||
if (riid && !IsEqualGUID(&IID_IDirectDraw, riid))
|
||||
{
|
||||
printf(" IID_IDirectDrawX\n");
|
||||
|
||||
ddraw_AddRef(This);
|
||||
This->lpVtbl->SetDisplayMode2 = ddraw_SetDisplayMode2;
|
||||
}
|
||||
|
||||
*obj = This;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
ULONG __stdcall ddraw_Release(IDirectDrawImpl *This)
|
||||
{
|
||||
printf("DirectDraw::Release(This=%p)\n", This);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue