dinput: Free axis_map when joystick device is freed.
Wine-Bug: https://bugs.winehq.org//show_bug.cgi?id=36263 Signed-off-by: Rémi Bernon <rbernon@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
52aacd2377
commit
5cf67f00d0
|
@ -534,6 +534,17 @@ HRESULT WINAPI JoystickWGenericImpl_GetCapabilities(LPDIRECTINPUTDEVICE8W iface,
|
|||
return DI_OK;
|
||||
}
|
||||
|
||||
|
||||
ULONG WINAPI JoystickWGenericImpl_Release(LPDIRECTINPUTDEVICE8W iface)
|
||||
{
|
||||
JoystickGenericImpl *This = impl_from_IDirectInputDevice8W(iface);
|
||||
void *axis_map = This->axis_map;
|
||||
ULONG res = IDirectInputDevice2WImpl_Release(iface);
|
||||
if (!res) HeapFree(GetProcessHeap(), 0, axis_map);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* GetObjectInfo : get object info
|
||||
*/
|
||||
|
|
|
@ -786,7 +786,7 @@ static const IDirectInputDevice8WVtbl JoystickWvt =
|
|||
{
|
||||
IDirectInputDevice2WImpl_QueryInterface,
|
||||
IDirectInputDevice2WImpl_AddRef,
|
||||
IDirectInputDevice2WImpl_Release,
|
||||
JoystickWGenericImpl_Release,
|
||||
JoystickWGenericImpl_GetCapabilities,
|
||||
IDirectInputDevice2WImpl_EnumObjects,
|
||||
JoystickLinuxWImpl_GetProperty,
|
||||
|
|
|
@ -1231,7 +1231,7 @@ static const IDirectInputDevice8WVtbl JoystickWvt =
|
|||
{
|
||||
IDirectInputDevice2WImpl_QueryInterface,
|
||||
IDirectInputDevice2WImpl_AddRef,
|
||||
IDirectInputDevice2WImpl_Release,
|
||||
JoystickWGenericImpl_Release,
|
||||
JoystickWGenericImpl_GetCapabilities,
|
||||
IDirectInputDevice2WImpl_EnumObjects,
|
||||
JoystickWImpl_GetProperty,
|
||||
|
|
|
@ -1484,7 +1484,7 @@ static const IDirectInputDevice8WVtbl JoystickWvt =
|
|||
{
|
||||
IDirectInputDevice2WImpl_QueryInterface,
|
||||
IDirectInputDevice2WImpl_AddRef,
|
||||
IDirectInputDevice2WImpl_Release,
|
||||
JoystickWGenericImpl_Release,
|
||||
JoystickWGenericImpl_GetCapabilities,
|
||||
IDirectInputDevice2WImpl_EnumObjects,
|
||||
JoystickWImpl_GetProperty,
|
||||
|
|
|
@ -59,6 +59,8 @@ DWORD joystick_map_pov(const POINTL *p) DECLSPEC_HIDDEN;
|
|||
|
||||
BOOL device_disabled_registry(const char* name) DECLSPEC_HIDDEN;
|
||||
|
||||
ULONG WINAPI JoystickWGenericImpl_Release(LPDIRECTINPUTDEVICE8W iface);
|
||||
|
||||
HRESULT WINAPI JoystickWGenericImpl_GetObjectInfo(LPDIRECTINPUTDEVICE8W iface,
|
||||
LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow) DECLSPEC_HIDDEN;
|
||||
|
||||
|
|
Loading…
Reference in New Issue