Commit Graph

241 Commits

Author SHA1 Message Date
Rémi Bernon d0248b6c6a dinput/tests: Add some windows.gaming.input device tests.
Only works with an XBox gamepad, looks like DInput gamepads aren't
exposed as WGI gamepads.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-24 18:38:34 +01:00
Rémi Bernon 7e7c0ed9c5 dinput/tests: Add some windows.gaming.input hotplug tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-24 18:38:30 +01:00
Rémi Bernon 21cdca2d8c dinput/tests: Add more tests for simulation HID usages.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-22 20:04:09 +01:00
Francois Gouget 57d342afe5 dinput/tests: Remove an unneeded NULL cast.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-14 21:20:42 +01:00
Francois Gouget c76b617119 dinput/tests: Remove spaces before linefeeds.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-14 21:20:42 +01:00
Rémi Bernon 19a5881b0b dinput/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-02-08 11:26:48 +01:00
Rémi Bernon be6d33824a dinput: Canonicalize DirectInput(8) instance creation.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-08 10:49:03 +01:00
Rémi Bernon ac7ff2611d dinput: Cleanup DllGetClassObject and IClassFactory implementation.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-07 11:02:25 +01:00
Rémi Bernon 2266356542 dinput/tests: Add some CoCreateInstance and aggregation tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-07 11:02:22 +01:00
Rémi Bernon 0c3686f549 dinput/tests: Merge dinput8.c tests with dinput.c.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-07 11:02:20 +01:00
Rémi Bernon c489356d0b ntoskrnl.exe: Enforce path case in WM_DEVICECHANGE notifications.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-28 21:10:21 +01:00
Rémi Bernon 439d126a99 sechost: Support device interface notifications filtering.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-28 21:10:21 +01:00
Rémi Bernon 41ff8effa3 user32: Add a filter member to device_notification_details.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-28 21:10:21 +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 22f9f5caea dinput/tests: Add some RegisterDeviceNotificationA and hotplug tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-27 18:02:43 +01:00
Rémi Bernon ea60e4678c dinput: Return DIERR_INPUTLOST when device is removed.
This fixes hotplug with DS4 and other DInput-compatible controllers in
Tekken 7.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-24 21:44:51 +01:00
Rémi Bernon c232fce6ea dinput/tests: Add some tests for DIERR_INPUTLOST conditions.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-24 21:44:51 +01:00
Rémi Bernon b5f92fe75a dinput/tests: Load the test driver in the WinePlugPlay group.
So that it shares hidclass.sys with other device drivers. This won't
make all the tests to pass if there's some physical devices, but it'll
avoid a few spurious failures.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-20 16:57:17 +01:00
Arkadiusz Hiler feea75c64b dinput: Implement HID wheel type detection.
Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-20 16:57:17 +01:00
Arkadiusz Hiler 389ecae089 dinput/tests: Test HID device with steering wheel and various pedal combinations.
Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-20 16:57:16 +01:00
Arkadiusz Hiler 2420f7e188 dinput/tests: Add static asserts for arrays that have to match in size.
Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-19 16:19:07 +01:00
Arkadiusz Hiler d397f76338 dinput/tests: Don't consider extra IOCTL_HID_GET_STRING an error.
It's easy to get them on Windows depending what software/services are
running.

Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-19 16:19:07 +01:00
Rémi Bernon 9479e217b8 hidclass.sys: Always read InputReportByteLength bytes when not polling.
This fixes several games (e.g. ICEY) not working well with DS4 gamepad
over bluetooth, as we fixup the input report sizes, and the game expects
them to be longer.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-12 17:27:54 +01:00
Rémi Bernon 352cfbcf1b dinput/tests: Check that InputReportByteLength bytes are read.
Regardless of how long the driver packet is.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-12 17:27:40 +01:00
Rémi Bernon 85148f9ee0 dinput: Return HID class guid in DIPROP_GUIDANDPATH property.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-04 11:51:49 +01:00
Rémi Bernon 5499ba3929 dinput: Allow 0xff as a DIDFT_ANYINSTANCE alias with old dinput version.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52267
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-04 11:51:46 +01:00
Rémi Bernon c69c9b55d7 dinput: Return DIERR_UNSUPPORTED for properties with old dinput version.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-04 11:51:41 +01:00
Rémi Bernon bef9b8a2bf dinput/tests: Test simple joystick with older dinput versions.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-04 11:51:28 +01:00
Rémi Bernon 6ac7d042f7 dinput/tests: Remove verbose and redundant tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-03 16:46:02 +01:00
Rémi Bernon 4c4dedb941 dinput/tests: Split joystick tests into separate sources.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-03 16:46:02 +01:00
Rémi Bernon d22746fe09 dinput/tests: Move tests from dinput8/tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-03 16:46:02 +01:00
Arkadiusz Hiler 5cb70e73f0 dinput/tests: Make overlapped format tests more robust.
Both Acquire() and event processing with DirectInput seem to be
asynchronous. In most cases we can just keep hammering GetDeviceData()
until the event gets processed.

Things get pretty racy around Acquire() though. If we fire event right
after the device is acquired we can find ourselves in one of the three
situations:

1. Event happened after acquiring has completed - the wait will suffice.

2. Event happened before acquiring did any real work - the device will
   pick up the state as if the event was processed, but there's nothing
   in GetDeviceData(). Because of that we cannot fail on wait.

3. Event happened somewhere in the middle of acquiring - we ended up
   both missing the event for GetDeviceData() and we have outdated
   state. Sending event again will register as if the button was not
   already pressed.

This change covers all three scenarios.

Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-05 20:43:28 +02:00
Arkadiusz Hiler d10887b8f5 dinput: Don't add 'default value 0' entries to the data transform.
This helps when dealing with the quirky c_dfDIJoystick2 format,
which defines all the sliders as overlapping, i.e. rglSlider[2],
rglVSlider[2], rglASlider[2] and rglFSlider[2] all share the same
offset.

With the Linux backends, if the device exposes enough axes (e.g. some
HOTAS) we end up using rglSlider.

Let's make sure we don't unnecessarily override the values there.

Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-08 21:13:54 +02:00
Rémi Bernon 5ef24d1281 dinput: Prefer IDirectInputW interfaces over IDirectInputA.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-28 21:53:07 +02:00
Rémi Bernon 49c66a3a94 dinput/tests: Check IDirectInputDevice2AImpl_GetObjectInfo error codes.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-26 21:29:37 +02:00
Rémi Bernon ab8e416787 dinput/tests: Check IDirectInputDevice_EnumObjects error codes.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-25 21:13:01 +02:00
Rémi Bernon 5fe103107a dinput: Use IDirectInputDevice8W interface consistently.
Instead of sometimes using IDirectInputDevice8A.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-25 21:13:01 +02:00
Rémi Bernon 15beabe071 dinput8/tests: Flush events after creating window.
To make it more likely it gets focused on X11 and fix spurious failures.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-25 21:13:01 +02:00
Arkadiusz Hiler 0a82d891fc dinput: Implement device creation using product GUID.
This fixes Far Cry Primal controller discovery.

Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-23 22:16:12 +01:00
Michael Stefaniuc 64ee238016 dinput/tests: Use wide-char string literals.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-07 11:24:12 +02:00
Brendan Shanks 1832dc3df3 dinput: Fix IDirectInputEffect::SetParameters() when called with flags=0.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-24 10:15:30 +02:00
Brendan Shanks 23a55927af dinput/tests: Test IDirectInputEffect::SetParameters() with a zeroed DIEFFECT and flags=0.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-24 10:15:28 +02:00
Brendan Shanks f66517b5a2 dinput: Fix IDirectInputEffect::SetParameters() behavior with NULL effect parameters.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-26 09:23:30 +01:00
Brendan Shanks f00b59f597 dinput/tests: Test IDirectInputEffect::SetParameters() with NULL effect parameters.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-26 09:23:28 +01:00
Alistair Leslie-Hughes 8d05256172 dinput: Cap the buffer size to 20.
When a program calls SetProperty with DIPROP_BUFFERSIZE, dinput records
this value for GetProperty but only uses it when the device can support
that number of buffers otherwise a max value.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45732
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-13 19:41:02 +01:00
Alistair Leslie-Hughes d61d710121 dinput: Mouse device doesn't support property DIPROP_VIDPID.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-11 12:48:11 +01:00
Alistair Leslie-Hughes f10f98cfa2 dinput: Keyboard device doesn't support property DIPROP_VIDPID.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-11 12:48:08 +01:00
Alistair Leslie-Hughes 61a85a6031 dinput/tests: Remove unrequired pointer checks (Coverity).
Also fixes a few test strings.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-21 17:11:43 +02:00
Alistair Leslie-Hughes 0555209757 dinput/tests: Add checks for Acquire/Unacquire.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-08 10:57:50 +02:00
Rémi Bernon d7916cdf4f dinput/tests: Add test to validate interactions between dinput and raw input devices.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-27 21:54:47 +02:00
Brendan Shanks 50785992d0 dinput/tests: Test for correct guidProduct.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-20 21:29:37 +02:00
Alexey Prokhin 1235ad1932 dinput/tests: Check path format of DIPROP_GUIDANDPATH property.
Signed-off-by: Alexey Prokhin <alexey@prokhin.ru>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-10 20:25:40 +02:00
Alexey Prokhin e2465fdb0a dinput/tests: Remove todo from DIPROP_GUIDANDPATH test.
Signed-off-by: Alexey Prokhin <alexey@prokhin.ru>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-10 20:25:38 +02:00
Alistair Leslie-Hughes 87a8622ffe dinput/tests: Remove unrequired if (Coverity).
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-27 14:39:34 +02:00
Alistair Leslie-Hughes ab5d9e43cb dinput: Support DIDEVICEINSTANCE_DX3 for keyboard GetDeviceInfo.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-21 18:08:37 +02:00
Alistair Leslie-Hughes c4debff5db dinput: Improve returned flags in Mouse GetObjectInfo.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-17 20:42:22 +02:00
Alexandre Julliard 1d399dba61 dinput/tests: Remove duplicate const.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-14 20:37:34 +02:00
Alistair Leslie-Hughes fe4db5309e dinput: Allow enumeration of joysticks with DirectX 3.
Star Wars: Rogue 3D requests a DirectX 3.0 version
0108:trace:dinput:DirectInputCreateEx (0x400000,0300,{9a4cb684-236d-11d3-8e9d-00c04f6844ae},0x7acfa0,(nil))
and then tries to interate over all Joysticks.

When using modern windows, the current tests show that this is the correct behaviour.

However, it's possible to use a shim to allow older games, like the
one above, to interate over joysticks.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-13 13:29:43 +02:00
Alistair Leslie-Hughes 381fa00b6a dinput: Support DIDEVICEINSTANCE_DX3 for Mouse GetDeviceInfo.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-06 07:13:53 -05:00
Alistair Leslie-Hughes a2c10f4dca dinput: Don't return unsupported interfaces.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-03 21:51:08 +02:00
Alistair Leslie-Hughes b3c5062f36 dinput: Don't report SysMouse/Keyboard devices as supporting Force Feedback.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-26 21:05:08 +02:00
Sven Baars 2543295a15 dinput/tests: Fix some memory leaks (Valgrind).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-29 21:38:32 +01:00
Alexandre Julliard d62ac319d2 dinput/tests: Try harder to avoid spurious keyboard input.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-10 14:58:57 +01:00
Brendan McGrath 3a2834b3a4 dinput: Use the same GUID for Instance and Product.
Signed-off-by: Brendan McGrath <brendan@redmandi.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-31 17:22:36 +01:00
Brendan McGrath c357f3670f dinput/tests: Test that the GUID is the same for Instance and Product.
Signed-off-by: Brendan McGrath <brendan@redmandi.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-31 17:22:33 +01:00
Akihiro Sagawa 6be7d14fb9 dinput: Fix DIK code mappings on Japanese 106 keyboard.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45475
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-17 16:51:03 +02:00
Akihiro Sagawa d88a2086d1 dinput/tests: Add DIK code tests for symbols and punctuations.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-17 16:51:03 +02:00
Akihiro Sagawa 93b0080ba3 dinput/tests: Skip DIK code tests if the keyboard type doesn't match.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-17 16:51:03 +02:00
Akihiro Sagawa b735a42f1c dinput/tests: Peek messages for the target window only.
This fixes "keyboard.c:365: Tests skipped: failed to queue keyboard event"
message on my Win10 PC (real hardware).
Since some thread messages and window messages, including IME related,
are observed on the thread, they sometimes confuse the message handler.

Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-17 16:51:03 +02:00
Akihiro Sagawa 8001dda117 dinput: Return DIDEVTYPEKEYBOARD_JAPAN106 subtype when it is used.
For the further improvments, subtype is a member of SysKeyboardImpl structure.

Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-17 16:51:03 +02:00
Akihiro Sagawa 937dcde349 dinput/tests: Add more tests for keyboard subtypes.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-17 16:51:02 +02:00
Akihiro Sagawa 75a2893fca dinput/tests: Use GET_DIDEVICE_SUBTYPE macro in keyboard type tests.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-17 16:51:02 +02:00
Józef Kucia 4b90a46e36 dinput/tests: Use GetModuleHandleA() instead of LoadLibraryA() (Coverity).
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-15 20:55:10 +02:00
Michael Stefaniuc fb783bc636 dinput/tests: Use the available ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-11 11:41:59 +02:00
Dmitry Timoshkov 210cefd23d dinput/tests: Add some tests for DIK_ codes using different keyboard layouts.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-17 17:03:13 +02:00
Johann Frei 4bc1e172ec dinput: Implement X/Y axis granularity and add test.
Signed-off-by: Johann Frei <johann_frei@yahoo.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-08 11:27:19 -06:00
Zebediah Figura 51895145fd dinput/tests: Don't pump messages in test_acquire().
This causes intermittent failures due to implementation of our window drivers.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-06 11:13:16 +01:00
Zebediah Figura 58abb3518c dinput/tests: Remove a no longer needed workaround.
This was fixed by 41ce4a0158.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-06 10:55:16 +01:00
Bruno Jesus 5e59d093a2 dinput/tests: Add tests for DISFFC_STOPALL, DISFFC_RESET and GetEffectStatus.
Requires a FF-enabled joystick to test.

Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-30 13:05:44 +01:00
Bruno Jesus 97b5862e48 dinput/tests: Use EnumEffects and test a supported effect.
Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-24 12:06:28 +09:00
Bruno Jesus f051de0d37 dinput: Return the correct error when CreateEffect is not supported.
Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-22 12:40:34 +09:00
Bruno Jesus e8273ae497 dinput: Cope with NULL flags in LinuxInputEffectImpl_GetEffectStatus.
Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-19 16:14:30 +09:00
Bruno Jesus 44303b6625 dinput: Implement DIPROP_PRODUCTNAME in GetProperty.
Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-19 16:14:30 +09:00
Bruno Jesus 738e17b2d7 dinput: Properly fill the HID information for the controller in the js driver.
Even the Xbox 360 controller which does not use HID has the same flags
and usage page set on Windows.

Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-17 13:17:54 +09:00
Bruno Jesus 03181015c3 dinput/tests: Test for DIDOI_ASPECTPOSITION on joystick axes.
Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-17 11:54:03 +09:00
Bruno Jesus f1b782bfc8 dinput/tests: Improve controller debug information.
Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-15 12:56:23 +09:00
Michael Stefaniuc a516c0aa38 dinput/tests: Make use of todo_wine_if().
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-05 09:14:26 -05:00
Bernhard Übelacker dd08ef4063 dinput: Fail in SetCooperativeLevel on invalid hwnd.
MotoGP 3 demo fails to accept key presses to control the driver.
The game calls SetCooperativeLevel twice. First with an invalid hwnd
(but not NULL) and later with the real hwnd.

Signed-off-by: Bernhard Übelacker <bernhardu@vr-web.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-25 13:25:31 +09:00
Hugh McMaster 11669fa5e2 Assorted spelling and grammar fixes.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-17 22:56:40 +09:00
Sebastian Lackner bfb845f9fc dinput: Ensure X11 input events are forwarded to wineserver even without message loop.
This commit basically reverts b22ff8018a.

Windows does not do that, but our current implementation of winex11
requires periodic event polling to forward events to the wineserver.

Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Michael Müller <michael@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-06 01:13:58 +09:00
Huw Davies 4b110f7554 dinput/tests: Send a matching key-up event.
The user32 msg tests are failing (more than normal) as they still see 'Q' in the down state.
2015-05-22 18:04:28 +09:00
Sebastian Lackner 0d91274def dinput: Reset device state in SysKeyboard*Impl_Acquire. 2015-05-18 19:59:28 +09:00
André Hentschel 765abb771f dinput/tests: Avoid assigning values twice (PVS-Studio). 2015-03-20 12:41:44 +09:00
Amine Khaldi bd58a7ca45 dinput/tests: Declare pDirectInputCreateEx in a MSVC compatible way. 2015-02-24 12:51:37 +09:00
Bruno Jesus 1242417d13 dinput/tests: Release the instance after tests (valgrind). 2014-07-14 17:22:45 +02:00
Andrey Gusev add85f4687 Assorted typos fixes. 2014-02-12 19:15:32 +01:00
Alexandre Julliard 99ef0d6ff0 makefiles: Get rid of the MAKE_TEST_RULES variable. 2014-01-02 12:13:16 +01:00
Michael Stefaniuc 9a263e58fd dinput/tests: Compile with -D__WINESRC__. 2013-10-30 09:42:10 +01:00
Michael Stefaniuc 0e681027a2 tests: Compile the tests by default with -D__WINESRC__. 2013-10-02 11:04:02 +02:00
Lucas Zawacki 913cbb9f21 dinput/tests: Test for DIPROP_INSTANCENAME and DIPROP_GUIDANDPATH. 2012-10-11 20:22:02 +02:00