Commit Graph

32 Commits

Author SHA1 Message Date
Rémi Bernon 0ad25c896e xinput1_3/tests: Fix printf warnings with long types.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-31 18:38:54 +01:00
Alexandre Julliard f0cd33c69e include: Add support for defining Win32 types as 'long' where possible.
Add -DWINE_NO_LONG_TYPES to modules that still have compilation
warnings with long types.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-27 20:38:22 +01:00
Rémi Bernon 2eea1d615a winexinput.sys: Translate lower reports into XInput HID reports.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-10 21:58:28 +02:00
Rémi Bernon b680794c21 xinput1_3/tests: Wait for the state to change before checking it.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-03 21:43:03 +02:00
Rémi Bernon 6ae7e808bd winebus.sys: Use HID descriptor helpers in bus_sdl.c.
And remove old helpers.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-12 17:30:21 +02:00
Rémi Bernon b36b2999c8 hid: Return HIDP_STATUS_SUCCESS even if no usages are found.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-12 17:30:21 +02:00
Rémi Bernon 7a571127e4 xinput1_3/tests: Add some HID report tests.
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>
2021-08-11 23:00:50 +02:00
Andrew Eikum b84a4aa53b xinput: Check for NULL argument in XInputGetState.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-30 22:24:27 +02:00
Michael Stefaniuc 4fbd3a7c3a xinput/tests: Use the available ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-30 09:11:31 +02:00
Andrew Eikum de3591ca98 xinput: XInputGetStateEx takes the same struct as XInputGetState.
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>
2018-01-22 22:26:47 +01:00
Bruno Jesus 6b88529b3c xinput1_3/tests: Add interactive tests.
Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-12-14 17:33:02 +01:00
Bruno Jesus 4989d8727f xinput1_3/tests: Improve vibration tests.
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>
2016-12-09 11:38:06 +01:00
Bruno Jesus 547d9491af xinput1_3/tests: Explain an important test and fix remaining style issues.
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>
2016-12-07 14:45:18 +01:00
Bruno Jesus 67eec14ca0 xinput1_3/tests: Dump the gamepad values from XInputGetCapabilities.
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>
2016-12-07 14:45:18 +01:00
Bruno Jesus ea4edbe179 xinput1_3/tests: Test the GUIDs returned from XInputGetDSoundAudioDeviceGuids.
Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-12-07 14:45:17 +01:00
Bruno Jesus cb855d98d5 xinput1_3: Test proper no new data error from XInputGetKeystroke.
Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-12 11:10:56 +09:00
Bruno Jesus 50cb6434bb xinput1_3: Test every xinput DLL version.
Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-12 11:10:51 +09:00
Bruno Jesus e3cda2c45d xinput1_3/tests: Cope with XInputGetStateEx not being present by name.
Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-02 11:27:42 +09:00
Bruno Jesus 0fe758046d xinput1_3: Stub XInputGetStateEx.
Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-01 20:47:45 +09:00
Alexandre Julliard 99ef0d6ff0 makefiles: Get rid of the MAKE_TEST_RULES variable. 2014-01-02 12:13:16 +01:00
Alexandre Julliard 81b8ee863e makefiles: Add a standard header for all makefiles to replace the common variable initializations. 2010-09-19 12:36:48 +02:00
Alexandre Julliard b86d515ed6 dlls: Remove explicit imports of kernel32 and ntdll. 2010-07-21 17:38:36 +02:00
Alexandre Julliard bef5645eb1 makefiles: Remove the no longer needed explicit separators for dependencies. 2010-03-16 13:28:19 +01:00
Alexandre Julliard 6164ce2d82 makefiles: Use the standard C_SRCS variable as the list of test files.
This enables it to be auto-updated by make_makefiles.
2010-02-22 10:47:11 +01:00
Francois Gouget 5da42336d9 xinput1_3/tests: Add a trailing '\n' to an ok() call. 2009-01-09 14:06:13 +01:00
Andrew Fenn 37a7ca59b3 xinput1_3: Added test for XInputGetBatteryInformation. 2009-01-08 13:41:40 +01:00
Andrew Fenn ab0d420dd2 xinput1_3: Added test for XInputGetDSoundAudioDeviceGuids. 2009-01-08 13:36:57 +01:00
Andrew Fenn 1b3feb2a5c xinput1_3: Added tests for XInputGetKeystroke. 2009-01-07 12:20:48 +01:00
Andrew Fenn 2c54c3dc82 xinput1_3: Added tests for XInputSetState. 2009-01-02 12:08:26 +01:00
Paul Vriens 99eaf51bb7 xinput1_3/tests: Call FreeLibrary() after tests. 2008-12-16 12:51:08 +01:00
Andrew Fenn 611ebb53e3 xinput: Added XInputGetCapabilities function with test case. 2008-11-11 14:03:01 +01:00
Andrew Fenn 29789a8ef4 xinput: Added the function XInputGetState with test case. 2008-11-11 14:03:01 +01:00