Commit 15216098 authored by Vitaliy Margolen's avatar Vitaliy Margolen Committed by Alexandre Julliard

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

parent 7b472826
......@@ -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);
......
......@@ -153,7 +153,7 @@ HRESULT WINAPI DirectInputCreateEx(
if (!check_hook_thread())
{
IUnknown_Release( (LPDIRECTINPUT7A)This );
IUnknown_Release( &This->IDirectInput7A_iface );
return DIERR_GENERIC;
}
......
......@@ -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;
......
......@@ -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:
......
......@@ -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;
......
......@@ -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:
......
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment