[PATCH v2 4/5] dinput: Implement DIPROP_GUIDANDPATH property.
Rémi Bernon
rbernon at codeweavers.com
Tue Jun 29 08:15:23 CDT 2021
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
---
dlls/dinput/joystick_hid.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/dlls/dinput/joystick_hid.c b/dlls/dinput/joystick_hid.c
index 63cd5d7ca14..f8d7c5d21ac 100644
--- a/dlls/dinput/joystick_hid.c
+++ b/dlls/dinput/joystick_hid.c
@@ -53,6 +53,7 @@ struct hid_joystick
PHIDP_PREPARSED_DATA preparsed;
DIDEVICEINSTANCEW instance;
+ WCHAR device_path[MAX_PATH];
HIDD_ATTRIBUTES attrs;
};
@@ -132,6 +133,12 @@ static HRESULT WINAPI hid_joystick_GetProperty( IDirectInputDevice8W *iface, REF
value->dwData = impl->instance.guidInstance.Data3;
return DI_OK;
}
+ case (DWORD_PTR)DIPROP_GUIDANDPATH:
+ {
+ DIPROPGUIDANDPATH *value = (DIPROPGUIDANDPATH *)header;
+ lstrcpynW( value->wszPath, impl->device_path, MAX_PATH );
+ return DI_OK;
+ }
default: return IDirectInputDevice2WImpl_GetProperty( iface, guid, header );
}
}
@@ -460,6 +467,7 @@ static HRESULT hid_joystick_create_device( IDirectInputImpl *dinput, REFGUID gui
impl->preparsed = preparsed;
impl->instance = instance;
+ lstrcpynW( impl->device_path, device_path, MAX_PATH );
impl->attrs = attrs;
if (!(format = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*format) ))) goto failed;
--
2.32.0
More information about the wine-devel
mailing list