[2/2] dinput: Implement DIPROP_INSTANCENAME for joysticks
Lucas Zawacki
lfzawacki at gmail.com
Wed Oct 10 21:17:52 CDT 2012
From: Lucas Zawacki <lfzawacki at gmail.com>
This might help with bug #31737
---
dlls/dinput/joystick.c | 11 +++++++++++
include/dinput.h | 2 ++
2 files changed, 13 insertions(+)
diff --git a/dlls/dinput/joystick.c b/dlls/dinput/joystick.c
index 8c0b5e5..d32acec 100644
--- a/dlls/dinput/joystick.c
+++ b/dlls/dinput/joystick.c
@@ -328,6 +328,17 @@ HRESULT WINAPI JoystickWGenericImpl_GetProperty(LPDIRECTINPUTDEVICE8W iface, REF
}
break;
}
+ case (DWORD_PTR) DIPROP_INSTANCENAME: {
+ DIPROPSTRING *ps = (DIPROPSTRING*) pdiph;
+ DIDEVICEINSTANCEW didev;
+
+ didev.dwSize = sizeof(didev);
+
+ IDirectInputDevice_GetDeviceInfo(iface, &didev);
+ lstrcpynW(ps->wsz, didev.tszInstanceName, MAX_PATH);
+
+ return DI_OK;
+ }
default:
return IDirectInputDevice2WImpl_GetProperty(iface, rguid, pdiph);
}
diff --git a/include/dinput.h b/include/dinput.h
index 3125800..8c779c2 100644
--- a/include/dinput.h
+++ b/include/dinput.h
@@ -905,6 +905,8 @@ typedef const DIPROPSTRING *LPCDIPROPSTRING;
#define DIPROP_CALIBRATION MAKEDIPROP(11)
#define DIPROP_GUIDANDPATH MAKEDIPROP(12)
+
+#define DIPROP_INSTANCENAME MAKEDIPROP(13)
#define DIPROP_JOYSTICKID MAKEDIPROP(15)
#define DIPROP_KEYNAME MAKEDIPROP(20)
#define DIPROP_VIDPID MAKEDIPROP(24)
--
1.7.9.5
More information about the wine-patches
mailing list