Commit graph

1353 commits

Author SHA1 Message Date
Ivo Ivanov c821787338 dinput/tests: Reduce the available FFB axes to X and Y in test_windows_gaming_input.
Windows.Gaming.Input on Windows always uses the X and Y axes for
FFB, ignoring what is declared in the HID report descriptor, and
the Axes Enable collection. Since we have the correct behavior
on Wine, this allows the test to complete on both platforms
without issues.
2022-11-25 10:02:40 +01:00
Ivo Ivanov 5f8f6c3452 windows.gaming.input: Implement IForceFeedbackMotor_get_SupportedAxes. 2022-11-25 10:02:37 +01:00
Ivo Ivanov cd75ed1800 dinput: Always send both "Type Specific" and "Set Effect" reports on initial Download.
Fixes the Download method not sending an initial type specific
HID PID report in the rare cases where all type specific params
are set to 0 through the initial SetParameters call, so they aren't
considered as modified.

FH5 is affected by this issue, since it initially sets the
direction of its constant effect to 0, which translates to 0
magnitude in dinput.
2022-11-25 10:02:36 +01:00
Rémi Bernon a146f9b6f1 dinput/tests: Test zero-ed force feedback effect parameters. 2022-11-25 10:02:35 +01:00
Ivo Ivanov 6b1b521193 dinput: Remove redundant physical range values.
The physical range is not correct for the given usage.

Signed-off-by: Ivo Ivanov <logos128@gmail.com>
2022-11-22 18:27:30 +01:00
Ivo Ivanov 29894e1c9a dinput: Prevent a potential array overflow error during the conversion from spherical to Cartesian coordinates.
Signed-off-by: Ivo Ivanov <logos128@gmail.com>
2022-11-22 18:27:30 +01:00
Alex Henrie 929de48426 dinput/tests: Put the calling convention inside the function pointer parentheses. 2022-11-22 09:55:36 +01:00
Matthew Tran a08eb8969a hid: Fix HidP_(Get|Set)(Scaled)UsageValue with usage ranges and arrays. 2022-11-21 21:21:29 +01:00
Matthew Tran b30a372099 dinput/tests: Fix incorrect HID STRING_INDEX tag value. 2022-11-21 21:21:20 +01:00
Rémi Bernon 87744a57fa dinput/tests: Add more HidP_(Set|Get)UsageValue tests with array caps. 2022-11-21 21:21:20 +01:00
Matthew Tran 4c02d8e7a8 dinput/tests: Add more tests for HidP_SetUsageValue. 2022-11-21 21:21:20 +01:00
Alex Henrie f0605758e0 dinput/tests: Avoid using GCC's typeof extension.
typeof is not available in MSVC.
2022-11-21 18:03:53 +01:00
Alex Henrie f3e9a1b789 dinput/tests: Get rid of pDirectInputCreateEx.
DirectInputCreateEx is available on all versions of Windows since XP
at least.
2022-11-17 16:35:54 +01:00
Rémi Bernon 245297d5cf dinput/tests: Add dummy flaky test count.
Fixes "Use of uninitialized value $Flaky" message in testbot reports.
2022-10-20 17:21:45 +02:00
Alex Henrie e72a16b57f uuid: Add devguid.h.
Needed to compile Tera Term.
2022-10-19 21:17:34 +02:00
Alexandre Julliard 48f99c4145 dinput/tests: Mark a mouse input test as flaky. 2022-09-26 21:49:54 +02:00
Francois Gouget aeb9737388 dinput/tests: Remove WINAPI on static functions where not needed. 2022-08-31 18:31:43 +02:00
Francois Gouget 92b6c23790 dinput: Remove WINAPI on static functions where not needed. 2022-08-31 18:31:43 +02:00
Rémi Bernon 4c584fe773 win32u: Read rawinput device preparsed data using virtual memory. 2022-07-27 23:07:07 +02:00
Rémi Bernon 92f3f2dd9c dinput/tests: Add some rawinput joystick tests. 2022-07-27 23:07:07 +02:00
Rémi Bernon e482d183dc dinput/tests: Wait for Acquire to complete when injecting input. 2022-07-27 23:07:07 +02:00
Arkadiusz Hiler 7fd01cf7dd dinput/tests: Test GetObjectInfo() with three sliders and a proper format. 2022-07-25 18:13:01 +02:00
Arkadiusz Hiler 101bf6c8bd dinput/tests: Assert that we can't get info about the third slider with c_dfDIJoystick2. 2022-07-25 18:13:01 +02:00
Arkadiusz Hiler 6719e6b2d3 dinput: Use GUID_Slider type for dials. 2022-07-25 18:13:01 +02:00
Arkadiusz Hiler 50690e08bd dinput: Enumerate user format object forwards.
It's important for the default broken formats like c_dfDIJoystick2 which
have multiple sets of sliders defined with the same offsets.
2022-07-25 18:13:00 +02:00
Arkadiusz Hiler 76a1fd2804 dinput/tests: Use helper for checking device object instances. 2022-07-25 18:13:00 +02:00
Arkadiusz Hiler 8a74acd73a dinput: Get rid of unused parameter in match_device_object. 2022-07-25 18:13:00 +02:00
Arkadiusz Hiler 17ce835ed3 dinput: Set correct object names for dials and sliders. 2022-07-25 18:13:00 +02:00
Francois Gouget 1bf88f860e dinput/tests: Add a trailing linefeed to some ok() calls.
Signed-off-by: Francois Gouget <fgouget@free.fr>
2022-07-25 09:38:30 +02:00
Rémi Bernon 1854001c79 dinput/tests: Remove racy IForceFeedbackEffect reference count checks.
Because the async operation holds a reference on the invoker and the
param, it may keep the effect alive until the worker thread releases
its reference on the async operation. We have no way to synchronize on
that.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53199
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-07-07 11:20:27 +02:00
Rémi Bernon 2020541b4b dinput/tests: Avoid window activation race conditions with Wine.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53240
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-07-07 11:20:27 +02:00
Rémi Bernon e1083de9a7 dinput/tests: Merge keyboard.c tests into device8.c.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-06-10 11:59:25 +02:00
Rémi Bernon cda4596cad dinput/tests: Run keyboard info tests for every dinput version.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-06-10 11:59:25 +02:00
Rémi Bernon 74b9bd6767 dinput/tests: Merge mouse.c tests into device8.c.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-06-10 11:59:24 +02:00
Rémi Bernon fd46b4bb48 dinput/tests: Run mouse info tests for every dinput version.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-06-10 11:59:24 +02:00
Rémi Bernon d4ea5f98c3 dinput: Fix DIPROP_FFGAIN mouse and keyboard tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-06-10 11:59:24 +02:00
Rémi Bernon 6a95003b8b dinput/tests: Add some broken joystick axis results.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-06-10 11:59:24 +02:00
Zebediah Figura cf2e168c3a dinput: Use IOCTL_HID_GET_WINE_RAWINPUT_HANDLE to retrieve the raw input handle.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-06-09 20:55:37 +02:00
Rémi Bernon a53298f4d0 dinput/tests: Merge device.c tests into device8.c.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-06-09 20:55:20 +02:00
Rémi Bernon f5e9079ed7 dinput/tests: Use dinput_test_(init|exit) for all tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-06-09 20:55:20 +02:00
Rémi Bernon 4e04c710ad dinput/tests: Avoid requiring foreground window in SetCooperativeLevel tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-06-09 20:55:20 +02:00
Rémi Bernon fab2af1529 dinput/tests: Add a test for multiple top-level collections.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-06-02 17:25:06 +02:00
Rémi Bernon c76915958b dinput/tests: Support test IOCTLs on the bus control interface.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-06-02 17:25:06 +02:00
Rémi Bernon 5611335198 dinput/tests: Fix source file in driver test context.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-06-02 17:25:06 +02:00
Rémi Bernon 01e8a9d03b dinput/tests: Enforce ioctl buffer sizes to avoid overflows.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-06-02 17:25:06 +02:00
Rémi Bernon 5a1d2b58b3 dinput/tests: Move bus PDO ioctl handling to a separate helper.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-06-02 17:25:06 +02:00
Rémi Bernon b7f51783bb windows.gaming.input: Implement IForceFeedbackEffect_get_State.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-19 18:30:45 +02:00
Rémi Bernon b2b1e6a438 windows.gaming.input: Implement IForceFeedbackEffect_(Start|Stop).
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-19 18:30:43 +02:00
Rémi Bernon 11cb3bbf69 dinput: Make sure converted direction values are always positive.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-18 21:46:35 +02:00
Rémi Bernon 37abfa73f2 windows.gaming.input: Implement IConditionForceEffect_SetParameters.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-18 21:46:33 +02:00