Commit Graph

59 Commits

Author SHA1 Message Date
Arkadiusz Hiler 8d206333fd dinput: Implement DIPROP_APPDATA.
This fixes not working analog inputs on game controllers in Slay the Spire.

Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-10 20:44:41 +01:00
Arkadiusz Hiler 542f613456 dinput: Clear action mapping with SetDataFormat().
Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-10 20:44:18 +01:00
Arkadiusz Hiler d3e7e0426c dinput8/tests: Make input helper function more versatile.
test_device_input() now takes properly sized appdata expected value and
can be used to send any keyboard event. It also drains device's queue so
it can be called multiple times on a single device instance.

Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-10 20:44:10 +01:00
Michael Stefaniuc 21e3ba96f8 dinput8/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
Rémi Bernon 81d1c79dcd dinput8: Use rawinput interface for mouse device.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-13 21:17:17 +02:00
Rémi Bernon 03ad3ca17a dinput8/tests: Add DISCL_EXCLUSIVE / rawinput test.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-13 21:17:13 +02:00
Rémi Bernon 1e7378d80c user32: Implement GetRegisteredRawInputDevices.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-13 21:17:11 +02:00
Brendan Shanks f65cfbfe9b dinput: Fix DInput8 keyboard behavior for injected events with scancode=0.
Grand Theft Auto IV injects VK_F8 and scancode=0, and expects DirectInput not
to report that F8 is pressed.

Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-21 22:54:26 +02:00
Brendan Shanks d5fd3c8a38 dinput: Block Acquire() until hooks are installed to prevent input being lost.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-21 22:54:26 +02:00
Brendan Shanks f042ba4991 dinput8/tests: Test injecting keyboard events.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-13 12:15:03 +02:00
Francois Gouget 1bc90ab802 dinput8/tests: A spelling fix in a comment.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-09 16:25:56 +02:00
Rémi Bernon e001daf5c1 dinput8/tests: Add window name and window class name test.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-27 21:54:52 +02:00
Rémi Bernon 2f51ebd961 dinput8/tests: Add test to validate interactions between dinput8 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:50 +02:00
Alexandre Julliard a125baf4da dinput8/tests: Remove duplicate const.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-14 20:37:38 +02: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
Sven Baars 76cbd21c5a dinput8/tests: Fix some memory leaks (Valgrind).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-21 16:06:33 +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
Michael Stefaniuc 91c3e8ebac dinput8/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
Jetro Jormalainen 41b126b5fc dinput: Handle username in EnumDevicesBySemantics.
EnumDevicesBySemantics enums only devices with given username when
DIEDBSFL_THISUSER is set and only unowned devices when
DIEDBSFL_AVAILABLEDEVICES is set.

Signed-off-by: Jetro Jormalainen <jje-wine@jv.jetro.fi>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-03 20:43:39 +01:00
Jetro Jormalainen 967399eba0 dinput: Keep username same between device objects.
Signed-off-by: Jetro Jormalainen <jje-wine@jv.jetro.fi>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-03 20:43:39 +01:00
Jetro Jormalainen 04bddb6c93 dinput: Give correct count of devices still to be enumerated.
EnumDevicesBySemantics should give count of all devices instead of
just keyboard and mouse still to be enumerated when calling callback.

Signed-off-by: Jetro Jormalainen <jje-wine@jv.jetro.fi>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-09 19:38:07 +01:00
Bruno Jesus d19ff2d828 dinput8/tests: Debug device information during enumeration callback.
Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-15 12:56:35 +09:00
Michael Stefaniuc 12f8274539 dinput8/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:28 -05:00
Bernhard Übelacker 86cdf0b1cb dinput8/tests: Add valid wide string termination to actionName member.
Signed-off-by: Bernhard Übelacker <bernhardu@mailbox.org>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-05 09:07:12 -05:00
Bernhard Übelacker fbc85ddc28 dinput: Implement device property DIPROP_USERNAME.
Signed-off-by: Bernhard Übelacker <bernhardu@vr-web.de>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-31 15:57:32 +09:00
Piotr Caban 8d5b1dd502 dinput8: Create a window that will receive events generated by input tests. 2014-03-07 11:30:27 +01: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
André Hentschel 7ddb8e25bb dinput8/tests: Enable compilation with -D__WINESRC__. 2013-11-11 13:27:27 +01:00
Michael Stefaniuc 0e681027a2 tests: Compile the tests by default with -D__WINESRC__. 2013-10-02 11:04:02 +02:00
Lucas Zawacki d5e9cedaf5 dinput: BuildActionMap should not fail if mapping has no pre-stored settings. 2012-08-28 14:41:04 +02:00
Lucas Zawacki 851d38c4ef dinput8/tests: Test load actions when there's no pre-stored ones. 2012-08-28 14:41:02 +02:00
Lucas Zawacki af1dcde288 dinput: SetActionMap saving mappings. 2012-08-27 11:13:15 +02:00
Lucas Zawacki 77cab1ce98 dinput8/tests: Added tests for saving and retrieving settings with SetActionMap. 2012-08-27 11:12:23 +02:00
Józef Kucia 42235c3cc9 dinput8/tests: Use CLSCTX_INPROC_SERVER instead of a magic number. 2012-03-26 18:15:05 +02:00
Vitaliy Margolen 699da40d1b dinput: Add more error checking to IDirectInput_GetDeviceStatus. 2011-11-29 14:04:25 +01:00
Vitaliy Margolen 310859db67 dinput: Add more parameter checking to enum devices. 2011-11-29 14:04:20 +01:00
Vitaliy Margolen a84d2fe20e dinput: Stub IDirectInputJoyConfig8 interface. 2011-11-29 14:04:01 +01:00
Lucas Fialho Zawacki 46e408d54c dinput8/tests: Tests for DIPROP_USERNAME property. 2011-10-25 16:57:28 +02:00
Lucas Fialho Zawacki 32f79acc49 dinput8/tests: Moved EnumDevicesBySemantics specific tests to dinput.c and added a couple more. 2011-10-25 16:57:28 +02:00
Vitaliy Margolen aba1ed78da dinput: Put some checks back into GetDeviceData for DirectInput 8. 2011-10-17 17:45:02 +02:00
Francois Gouget ed3c9a1eca Assorted spelling fixes. 2011-08-03 14:15:48 +02:00
Lucas Fialho Zawacki 8cc44cb8c3 dinput: SetActionMap setting the axis range according to the action format. 2011-07-22 12:57:22 +02:00
Marcus Meissner 3dc66a9d6d dinput: const REFIID is duplicate const (Coverity). 2011-07-14 14:13:40 +02:00
Lucas Fialho Zawacki bc5d32bec6 dinput: EnumDevicesBySemantics enumerating all kinds of joysticks. 2011-07-12 11:37:36 +02:00
Lucas Fialho Zawacki 662d332246 dinput: Prevent EnumDevicesBySematics from enumerating keyboard and mouse as having force feedback. 2011-07-11 12:24:55 +02:00
Lucas Fialho Zawacki a85f66e7a7 dinput8/tests: Tests for EnumDevicesBySemantics with different enumeration flags. 2011-07-11 12:24:06 +02:00
Andrew Nguyen c8c6aa0c2c dinput8/tests: Replicate the IDirectInput tests for IDirectInput8. 2011-07-06 11:13:55 +02:00
Andrew Nguyen cf073c8ad4 dinput8: Improve the behavior of DirectInput8Create. 2011-07-06 11:13:53 +02:00