Module: wine Branch: master Commit: 91f4af3418230305c9407711abe34d89156a47cf URL: https://source.winehq.org/git/wine.git/?a=commit;h=91f4af3418230305c9407711a...
Author: Rémi Bernon rbernon@codeweavers.com Date: Fri Aug 27 12:45:23 2021 +0200
dinput: Implement HID joystick IDirectInputDevice8_GetDeviceState.
Removing the trace as it can get pretty verbose otherwise.
Signed-off-by: Rémi Bernon rbernon@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/dinput/joystick_hid.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/dinput/joystick_hid.c b/dlls/dinput/joystick_hid.c index 01864bb91e5..53dc97177a1 100644 --- a/dlls/dinput/joystick_hid.c +++ b/dlls/dinput/joystick_hid.c @@ -51,6 +51,7 @@ DEFINE_DEVPROPKEY( DEVPROPKEY_HID_HANDLE, 0xbc62e415, 0xf4fe, 0x405c, 0x8e, 0xda struct hid_joystick { IDirectInputDeviceImpl base; + DIJOYSTATE2 state;
HANDLE device; PHIDP_PREPARSED_DATA preparsed; @@ -142,11 +143,13 @@ static HRESULT WINAPI hid_joystick_GetProperty( IDirectInputDevice8W *iface, con
static HRESULT WINAPI hid_joystick_GetDeviceState( IDirectInputDevice8W *iface, DWORD len, void *ptr ) { - FIXME( "iface %p, len %u, ptr %p stub!\n", iface, len, ptr ); + struct hid_joystick *impl = impl_from_IDirectInputDevice8W( iface );
if (!ptr) return DIERR_INVALIDPARAM;
- return DIERR_UNSUPPORTED; + fill_DataFormat( ptr, len, &impl->state, &impl->base.data_format ); + + return DI_OK; }
static HRESULT WINAPI hid_joystick_GetDeviceInfo( IDirectInputDevice8W *iface, DIDEVICEINSTANCEW *instance )