Rémi Bernon
42ba8f605d
dinput: Compute HID joystick object offsets dynamically.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-27 17:34:43 +02:00
Rémi Bernon
85d7c56a83
dinput: Convert DIPH_BYOFFSET filter to use current data format offsets.
...
Instead of hardcoded DIJOYSTATE2 offsets.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-27 17:34:43 +02:00
Rémi Bernon
e990e4b232
dinput: Return proper error status from HID joystick GetObjectInfo.
...
When no object matched the enumeration or when DIPH_DEVICE is used.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-27 17:34:43 +02:00
Rémi Bernon
1f8487e2f0
dinput: Enumerate all HID joystick objects at once.
...
Instead of using individual helpers.
The force-feedback EnumObjects test shows that we should enumerate the
output objects in their original order in the HID report descriptor, not
depending on their button/value nature.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-27 17:34:43 +02:00
Rémi Bernon
5c18aa58d3
dinput: Report HID joystick wheel usage as a Z axis.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-23 18:11:43 +02:00
Rémi Bernon
b61a272882
dinput8/tests: Add a wheel and vendor defined axis caps.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-23 18:11:39 +02:00
Rémi Bernon
1316142b62
dinput: Use fixed axis object instance number for common axes.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-23 18:11:29 +02:00
Rémi Bernon
eab7819d7a
dinput: Add an instance number to HID joystick collection objects.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-23 18:11:23 +02:00
Rémi Bernon
aa60766259
dinput: Set HID joystick objects wCollectionNumber field.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-23 18:11:19 +02:00
Rémi Bernon
0686815ff6
dinput: Check acquired state in IDirectInputDevice2WImpl_SetCooperativeLevel.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-23 18:11:15 +02:00
Rémi Bernon
0e75722971
dinput: Check data format dwObjSize in IDirectInputDevice2WImpl_SetDataFormat.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-23 18:11:09 +02:00
Rémi Bernon
f17ba9f67a
hidparse.sys: Fill additional HID internal structure fields.
...
Although we don't need them, it fixes a few todo_wine and reduces the
test output.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-22 21:47:45 +02:00
Rémi Bernon
9aaea0c17d
hidparse.sys: Output array caps data indexes in the correct order.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-22 21:47:45 +02:00
Rémi Bernon
e1e82148f8
hidparse.sys: Make internal HID structures compatible with native.
...
Or compatible enough ast least.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-22 21:47:45 +02:00
Rémi Bernon
54b2fc3553
dinput: Return correct errors from HID joystick IDirectInputDevice8_Poll.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-21 11:41:47 +02:00
Rémi Bernon
aa43d24cd8
dinput: Return correct errors from HID joystick IDirectInputDevice8_GetDeviceState.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-21 11:41:44 +02:00
Rémi Bernon
78f04ca082
dinput: Return correct errors from HID joystick IDirectInputDevice8_SetProperty.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-21 11:41:42 +02:00
Rémi Bernon
b4dfa8ff7b
dinput: Check sizes in HID joystick IDirectInputDevice8_GetProperty.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-21 11:41:37 +02:00
Rémi Bernon
0daf841712
dinput: Fix HID joystick DIPH_BYUSAGE object enumeration.
...
This adds some todo_wine because we now get the correct object, but it
has incorrect offset and instance number.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-21 11:41:30 +02:00
Rémi Bernon
af58bbb0c4
dinput8/tests: Don't check device object data sequence numbers.
...
We usually have them wrong but sometimes right.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-21 11:41:24 +02:00
Rémi Bernon
7c4941d0ec
dinput: Implement more accurate HID joystick device subtypes.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-20 22:45:49 +02:00
Rémi Bernon
9c30042c0c
dinput8/tests: Add some HID joystick device types tests.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-20 22:45:49 +02:00
Rémi Bernon
ae9f7b0364
dinput8/tests: Add some HID joystick IDirectInputDevice8_Initialize tests.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-20 22:45:49 +02:00
Rémi Bernon
50ae254747
dinput8/tests: Add some HID joystick IDirectInputDevice8_GetObjectInfo tests.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-20 22:45:49 +02:00
Alexandre Julliard
6ba7773121
makefiles: Add a -mcygwin flag to specify the inverse of -mno-cygwin.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-20 22:45:48 +02:00
Rémi Bernon
4b28a061ea
dinput8/tests: Add some HID joystick IDirectInputDevice8_EnumObjects tests.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-17 12:48:18 +02:00
Rémi Bernon
10ac8095cd
dinput8/tests: Add some HID joystick IDirectInputDevice8_SetProperty tests.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-17 12:48:18 +02:00
Rémi Bernon
878dff8dae
dinput8/tests: Add some HID joystick IDirectInputDevice8_GetDeviceData tests.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-17 12:48:18 +02:00
Rémi Bernon
635219f92b
dinput8/tests: Add some HID joystick IDirectInputDevice8_GetDeviceState tests.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-17 10:48:49 +02:00
Rémi Bernon
e293db88a8
dinput8/tests: Make ret_length optional in struct hid_expect.
...
So that we don't have to specify it explicitely every time. Input
reports length is now enforced, and we don't mean to test the length
every time we inject input.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-17 10:48:46 +02:00
Rémi Bernon
f9486e9847
dinput8/tests: Add some HID joystick IDirectInputDevice8_(Un)Acquire tests.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-16 22:22:44 +02:00
Rémi Bernon
2975ad8134
dinput8/tests: Add some HID joystick IDirectInputDevice8_SetCooperativeLevel tests.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-16 22:22:44 +02:00
Rémi Bernon
7da842a738
dinput8/tests: Add some HID joystick IDirectInputDevice8_SetEventNotification tests.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-16 22:22:44 +02:00
Rémi Bernon
7fcca74881
dinput8/tests: Add some HID joystick IDirectInputDevice8_SetDataFormat tests.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-16 22:22:44 +02:00
Rémi Bernon
2972e9973e
dinput8/tests: Add some HID joystick IDirectInput8_CreateDevice tests.
...
Creating a device with the instance guid may get the wrong one if a
true controller is plugged in.
This is because driver_hid.dll runs in a different process from
winehid.sys, and so gets another set of rawinput handles.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-16 22:22:44 +02:00
Rémi Bernon
c5e864d4b6
dinput8/tests: Add some HID joystick IDirectInputDevice8_GetProperty tests.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-16 22:22:44 +02:00
Rémi Bernon
8325c5331e
dinput8/tests: Add some HID joystick IDirectInputDevice8_GetCapabilities tests.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-15 19:34:21 +02:00
Rémi Bernon
52377b3dec
dinput8/tests: Add some HID joystick IDirectInputDevice8_GetDeviceInfo tests.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-15 19:34:21 +02:00
Rémi Bernon
7da8ad6dac
dinput8/tests: Add a new HID joystick test based on the HID driver.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-15 19:34:21 +02:00
Rémi Bernon
c0ea122c0c
dinput8/tests: Add tests for the internal HID preparsed data structures.
...
Correct DInput implementation will require it to iterate on the internal
HID structures, instead of using the higher-level value / button caps
abstraction.
This will make Wine DInput incompatible with native HID stack, unless
the internal structure match.
These tests exhibit native internal structures, which are close to what
Wine uses, so it should not be too complicated to restore compatibility.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-15 19:34:21 +02:00
Rémi Bernon
46f3ca4919
hidclass.sys: Complete all pending reads in polled mode only.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-14 18:32:04 +02:00
Rémi Bernon
10dd608700
dinput8/tests: Fix reported expected length in test message.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-14 18:32:02 +02:00
Rémi Bernon
d40d8d9686
hidclass.sys: Drop input packets with unexpected length in non-polled mode.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-14 18:32:00 +02:00
Rémi Bernon
880d7a11d7
dinput8/tests: Don't expect any IOCTL_HID_GET_STRING call.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-14 18:31:58 +02:00
Rémi Bernon
0b0d0cd6ed
dinput8/tests: Add some non-polled READ_REPORT tests.
...
Using the new custom IOCTL to complete reads on demand.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-14 18:31:56 +02:00
Rémi Bernon
10ddee1cda
dinput8/tests: Control expected READ_REPORT reports from the test executable.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-14 18:31:54 +02:00
Rémi Bernon
88a8e824e6
hidclass.sys: Enforce output packet lengths to match report lengths.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-13 11:34:10 +02:00
Rémi Bernon
29b90620c1
dinput8/tests: Control expected GET_INPUT reports from the test executable.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-13 11:34:05 +02:00
Rémi Bernon
441baa556a
dinput8/tests: Control expected WRITE_REPORT reports from the test executable.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-13 11:34:03 +02:00
Rémi Bernon
e56d6e496b
dinput8/tests: Control expected SET_OUTPUT reports from the test executable.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-13 11:33:59 +02:00