Module: wine Branch: master Commit: be1ef8ed1f70873b20cc889b58da5d5b68df4511 URL: https://gitlab.winehq.org/wine/wine/-/commit/be1ef8ed1f70873b20cc889b58da5d5...
Author: Rémi Bernon rbernon@codeweavers.com Date: Sat Mar 18 18:22:09 2023 +0100
dinput: Always set the DIPROP_BUFFERSIZE property in SetActionMap.
---
dlls/dinput/device.c | 4 ++-- dlls/dinput/tests/joystick8.c | 1 - 2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c index 3cf2d868dbe..a17df9aa69d 100644 --- a/dlls/dinput/device.c +++ b/dlls/dinput/device.c @@ -2088,8 +2088,8 @@ static HRESULT WINAPI dinput_device_SetActionMap( IDirectInputDevice8W *iface, D prop_range.lMax = format->lAxisMax; IDirectInputDevice8_SetProperty( iface, DIPROP_RANGE, &prop_range.diph );
- if ((prop_buffer.dwData = format->dwBufferSize)) - IDirectInputDevice8_SetProperty( iface, DIPROP_BUFFERSIZE, &prop_buffer.diph ); + prop_buffer.dwData = format->dwBufferSize; + IDirectInputDevice8_SetProperty( iface, DIPROP_BUFFERSIZE, &prop_buffer.diph );
if (username == NULL) GetUserNameW( username_buf, &username_len ); else lstrcpynW( username_buf, username, MAX_PATH ); diff --git a/dlls/dinput/tests/joystick8.c b/dlls/dinput/tests/joystick8.c index 86747652d60..48e097dcafa 100644 --- a/dlls/dinput/tests/joystick8.c +++ b/dlls/dinput/tests/joystick8.c @@ -941,7 +941,6 @@ static void test_action_map( IDirectInputDevice8W *device, HANDLE file, HANDLE e
hr = IDirectInputDevice8_GetProperty( device, DIPROP_BUFFERSIZE, &prop_dword.diph ); ok( hr == DI_OK, "GetProperty returned %#lx\n", hr ); - todo_wine ok( prop_dword.dwData == 0, "got dwData %#lx\n", prop_dword.dwData );