dinput: COM cleanup - use proper DirectInput interface with IUknown calls.

This commit is contained in:
Vitaliy Margolen 2011-01-09 15:43:09 -07:00 committed by Alexandre Julliard
parent 7b47282625
commit 15216098e0
7 changed files with 7 additions and 7 deletions

View File

@ -712,7 +712,7 @@ ULONG WINAPI IDirectInputDevice2AImpl_Release(LPDIRECTINPUTDEVICE8A iface)
list_remove( &This->entry );
LeaveCriticalSection( &This->dinput->crit );
IDirectInput_Release((LPDIRECTINPUTDEVICE8A)This->dinput);
IDirectInput_Release(&This->dinput->IDirectInput7A_iface);
This->crit.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->crit);

View File

@ -153,7 +153,7 @@ HRESULT WINAPI DirectInputCreateEx(
if (!check_hook_thread())
{
IUnknown_Release( (LPDIRECTINPUT7A)This );
IUnknown_Release( &This->IDirectInput7A_iface );
return DIERR_GENERIC;
}

View File

@ -368,7 +368,7 @@ static HRESULT alloc_device(REFGUID rguid, const void *jvt, IDirectInputImpl *di
newDevice->generic.props[i].lSaturation = 0;
}
IDirectInput_AddRef((LPDIRECTINPUTDEVICE8A)newDevice->generic.base.dinput);
IDirectInput_AddRef(&newDevice->generic.base.dinput->IDirectInput7A_iface);
newDevice->generic.devcaps.dwSize = sizeof(newDevice->generic.devcaps);
newDevice->generic.devcaps.dwFlags = DIDC_ATTACHED;

View File

@ -504,7 +504,7 @@ static JoystickImpl *alloc_device(REFGUID rguid, const void *jvt, IDirectInputIm
if (newDevice->joydev->has_ff)
newDevice->generic.devcaps.dwFlags |= DIDC_FORCEFEEDBACK;
IDirectInput_AddRef((LPDIRECTINPUTDEVICE8A)newDevice->generic.base.dinput);
IDirectInput_AddRef(&newDevice->generic.base.dinput->IDirectInput7A_iface);
return newDevice;
failed:

View File

@ -807,7 +807,7 @@ static HRESULT alloc_device(REFGUID rguid, const void *jvt, IDirectInputImpl *di
/* initialize default properties */
get_osx_device_elements_props(newDevice);
IDirectInput_AddRef((LPDIRECTINPUTDEVICE8A)newDevice->generic.base.dinput);
IDirectInput_AddRef(&newDevice->generic.base.dinput->IDirectInput7A_iface);
newDevice->generic.devcaps.dwSize = sizeof(newDevice->generic.devcaps);
newDevice->generic.devcaps.dwFlags = DIDC_ATTACHED;

View File

@ -236,7 +236,7 @@ static SysKeyboardImpl *alloc_device(REFGUID rguid, const void *kvt, IDirectInpu
df->dwNumObjs = idx;
newDevice->base.data_format.wine_df = df;
IDirectInput_AddRef((LPDIRECTINPUTDEVICE8A)newDevice->base.dinput);
IDirectInput_AddRef(&newDevice->base.dinput->IDirectInput7A_iface);
return newDevice;
failed:

View File

@ -223,7 +223,7 @@ static SysMouseImpl *alloc_device(REFGUID rguid, const void *mvt, IDirectInputIm
df->rgodf[i].dwType = DIDFT_MAKEINSTANCE(i) | DIDFT_PSHBUTTON;
newDevice->base.data_format.wine_df = df;
IDirectInput_AddRef((LPDIRECTINPUTDEVICE8A)newDevice->base.dinput);
IDirectInput_AddRef(&newDevice->base.dinput->IDirectInput7A_iface);
return newDevice;
failed: