Rémi Bernon
26c1131201
dinput: Use a single list for all acquired devices.
...
Instead of going through devices list of dinputs list, and checking
their acquired field, which is not CPU friendly.
This also removes the now unused IDirectInputImpl critical section and
devices list.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-09 21:23:33 +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
d2d3959d3d
dinput: Add "PIDVID" guidProduct and use for non-keyboards/mice.
...
Windows uses an undocumented GUID (ending in ASCII "PIDVID") for
non-keyboard/mouse devices. Various games (DiRT Rally 2) and libraries
(SDL, GLFW) look for this GUID to match specific devices or know that
the PID/VID can be extracted.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-20 21:29:37 +02:00
Alistair Leslie-Hughes
55edfc8837
dinput: Ensure buffer doesn't overflow (Coverity).
...
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-17 21:34:04 +02:00
Alexey Prokhin
2bcdf8b73b
dinput: Return fake DIPROP_GUIDANDPATH property for linux input joysticks.
...
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:33 +02:00
Tim Schumacher
5d51d8a25e
dinput/linuxinput: Remap wheel axes to X, Y, and Z.
...
Signed-off-by: Tim Schumacher <timschumi@gmx.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-03 22:33:30 +02:00
Tim Schumacher
66462cb7dc
dinput: Check for wheel axes/buttons when finding joysticks.
...
Signed-off-by: Tim Schumacher <timschumi@gmx.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-31 21:31:34 +02:00
Alistair Leslie-Hughes
132cf25ed6
dinput: Handle setting DIPROP_CALIBRATIONMODE mode in generic implementation.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47183
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-14 10:29:22 +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
52deca4900
dinput: Trace This pointer in a consistent way.
...
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-09 11:39:52 -05:00
Andrew Eikum
ae84957916
dinput: Use heuristics to guess if a device is a gamepad or a joystick.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47123
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-07 09:21:21 -05:00
Alistair Leslie-Hughes
1daeef7332
dinput: Use a helper function to get device type.
...
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-06 09:15:34 -05:00
Alistair Leslie-Hughes
b59f8c0c50
dinput: Don't report that we cannot open a device.
...
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
Andrew Eikum
085e58878f
dinput: Report controllers as gamepads, not joysticks.
...
This matches what Windows does with common controllers like xbox 360.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-18 23:37:55 +02:00
Bruno Jesus
8339de07ca
dinput: Simplify JoystickWImpl_Unacquire for Linux.
...
Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-30 13:05:40 +01:00
Bruno Jesus
27f456844b
dinput: DISFFC_RESET will not release the effects.
...
Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-30 13:05:36 +01:00
Bruno Jesus
2d2d833248
dinput: Downgrade a FIXME to WARN in JoystickWImpl_SendForceFeedbackCommand.
...
All valid commands are already there, anything else is an app bug.
Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-30 13:05:28 +01:00
Bruno Jesus
6bb2c4cded
dinput: Skip events that are not useful currently.
...
Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-26 11:14:38 +01:00
Bruno Jesus
6b44c4f5cc
dinput: Get the controller type from the device instance for Linux drivers.
...
Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-22 12:40:58 +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
30ae735425
dinput: Properly fill the HID information for the controller in the event driver.
...
Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-18 12:00:33 +09:00
Bruno Jesus
dd7b65730d
dinput: Implement GetDeviceInfo(A) using the W version in the event driver.
...
Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-18 12:00:31 +09:00
Corentin Rossignon
081930e70b
dinput: Fix product GUID generation in Linux joystick and event API.
...
Signed-off-by: Corentin Rossignon <corossig@gmail.com>
Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-25 14:28:37 +09:00
Charles Davis
4dba8a4e27
dinput: Don't define a debug channel when it isn't used.
...
Signed-off-by: Charles Davis <cdavis5x@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-18 00:22:04 +09:00
André Hentschel
c440168e53
dinput: Remove unused functions (Clang).
2014-11-25 19:49:40 +01:00
Andrew Eikum
46cb582a71
dinput: Fix logging typos.
2013-12-12 12:07:08 +01:00
Austin English
bfafb1ffc5
dinput: Consistently use GetCurrentTime().
2013-12-11 16:26:01 +01:00
Frédéric Delanoy
84fb23f476
dinput: Use BOOL type where appropriate.
2013-11-08 12:46:21 +01:00
Frédéric Delanoy
25f3356906
dinput: Use BOOL type where appropriate.
2013-10-04 12:46:26 +02:00
André Hentschel
c5e9479b85
dinput: Don't use autoheader styled define.
2013-06-18 12:57:44 +02:00
Andrew Eikum
0ba314ebfa
dinput: Enumerate devices past the first non-matching device.
2013-05-21 12:08:01 +02:00
Lucas Zawacki
45a19b0c9b
dinput: Initialize all axis (from 0 to ABS_MAX) with -1.
2013-03-25 16:24:30 +01:00
Michael Stefaniuc
ab542a92d5
dinput: Use assignment instead of memcpy to copy a struct.
2013-01-24 15:38:46 +01:00
Marcus Meissner
e10a658c0c
dinput: Added some missing free/close in disabled case (Coverity).
2012-09-03 15:49:39 +02:00
Lucas Zawacki
3da6f1754e
dinput: Disable linuxinput or linux joysticks based on registry key.
2012-08-24 11:19:38 +02:00
Lucas Zawacki
8bfb125617
dinput: Append driver name to dinput joysticks on Linux.
2012-08-24 11:16:53 +02:00
Lucas Zawacki
2cd3b908ad
dinput: Implement GetProperty for JOYSTICKID (LinuxInput driver).
2012-05-30 11:31:55 +02:00
Francois Gouget
c7cb3e6cb2
configure: Use errno.h instead of the non-standard sys/errno.h header.
2011-12-15 17:46:38 +01:00
Frédéric Delanoy
f932abf326
dlls: Assorted spelling fixes.
2011-08-01 18:26:27 +02:00
Lucas Fialho Zawacki
dc044e156d
dinput: BuildActionMap and SetActionMap stubs for generic joystick.
2011-07-12 11:37:23 +02:00
Vitaliy Margolen
20aa341032
dinput: Implement getting DIPROP_VIDPID property for evdev joystick driver. Fixes bug 26418.
2011-04-14 17:37:23 +02:00
Vitaliy Margolen
670d54a637
dinput: Ignore EV_MSC events instead of printing fixme.
2011-02-02 12:24:14 +01:00
Vitaliy Margolen
0ac5c60374
dinput: Combine ASCII and Unicode device create callbacks. Add tests.
2011-01-24 14:43:09 +01:00
Vitaliy Margolen
9441d898f7
dinput: Make newly created device append itself to Direct Input's list.
2011-01-19 12:58:01 +01:00
Vitaliy Margolen
6b30480021
dinput: COM cleanup - use interfaces instead of vtbl. Combine both Unicode and ASCII interfaces into the same classes.
2011-01-10 12:41:20 +01:00
Vitaliy Margolen
d88cbac1c5
dinput: Explicitly define ASCII and Unicode methods in evdev joystick.
2011-01-10 11:04:01 +01:00
Vitaliy Margolen
6a07885029
dinput: Explicitly define ASCII and Unicode methods in joystick base class. Use new methods in child classes.
2011-01-10 11:03:49 +01:00
Vitaliy Margolen
0f24b9e86f
dinput: Explicitly define ASCII and Unicode methods in DirectInputDevice base class. Make ASCII methods call Unicode. Use new methods in child classes.
2011-01-10 11:03:17 +01:00
Vitaliy Margolen
f09ace0d83
dinput: COM cleanup - use helper function instead of direct typecast in linuxinput joystick.
2011-01-10 11:02:00 +01:00
Vitaliy Margolen
0b99bf3edb
dinput: COM cleanup - use proper interface instead of typecasting This when calling queue_event.
2011-01-10 10:58:26 +01:00