[2/2] dinput: Implement DIPROP_INSTANCENAME for joystick (try 2)
Lucas Zawacki
lfzawacki at gmail.com
Thu Oct 11 08:45:27 CDT 2012
From: Lucas Zawacki <lfzawacki at gmail.com>
---
dlls/dinput/joystick.c | 11 +++++++++++
1 file changed, 11 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);
}
--
1.7.9.5
More information about the wine-patches
mailing list