This adds tests to validate the bogus HID devices exposed native XInput
driver. Interactive tests are also included to validate the HID report
values, and more specifically the weird combined triggers, which is
currently not implemented correctly in Wine.
Some third-party libraries, such as SDL, are known to rely on this bogus
HID devices and hardcode the expected report structure.
This has been tested on Windows 10 with XBox 360 controllers as well
as Xbox One S controllers.
The latter are detected as 045e:02ea on Linux, but as 045e:02ff on
Windows for some reason, and their descriptor seems a little bit
different.
Their exposed HID device also doesn't seem to work at all and ReadFile
never succeeds, so the interactive tests are skipped for these devices.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
XINPUT_STATE_EX has four extra bytes for padding, but is otherwise
identical to XINPUT_STATE. It was introduced in a libSDL header in
2012, for use with the undocumented function at xinput ordinal 100,
which we call XInputGetStateEx.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Specially the part to disable the vibration after the test. Manually
tested on Windows 8.
Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
It's important to explain why the test is done like that so in the
future nobody changes it without knowing the impacts.
Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Important to show that they changed between XInput versions 1.3 and 1.4.
Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>