Commit Graph

50 Commits

Author SHA1 Message Date
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 16a11d0c90 dinput: Return fake DIPROP_GUIDANDPATH property for linux joysticks.
Some Ubisoft titles use the property to check if a dinput gamepad is
also an xinput device.

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:29 +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 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
Alex Henrie 2ad7ecc6cd dinput: Turn two variables into static constants.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-04 16:13:10 +01:00
Michael Stefaniuc 6710a0485d dinput: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-15 13:56:16 +02:00
Bruno Jesus 777ca90601 dinput: Dump the condition effect correctly for 2 array items.
Based on ideas by Elias Vanderstuyft.

Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-24 12:06:35 +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 299a6ce5bb dinput: Use the correct index to remap the axis.
Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-18 20:38:12 +09:00
Bruno Jesus 4f545cb627 dinput: Properly debug DIDEVTYPE_HID in _dump_DIDEVCAPS.
Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-18 14:02:05 +09:00
Andrew Church 5ce8a1a91b dinput: Report DIDOI_ASPECTPOSITION flag for axes objects.
Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-17 11:53:57 +09:00
Aric Stewart 3d30db2248 dinput: Add JoystickID to the Instance Name. 2015-04-08 23:34:15 +09:00
Francois Gouget f505e6fb4a Assorted spelling fixes. 2015-03-19 21:54:14 +09:00
Bruno Jesus c257e8adf6 dinput: Fix device type dump. 2014-11-20 22:32:38 +09:00
Bruno Jesus e011307244 dinput: Remove duplicated TRACE check. 2014-04-25 10:16:51 +02:00
Frédéric Delanoy 25f3356906 dinput: Use BOOL type where appropriate. 2013-10-04 12:46:26 +02:00
Gurmail Bassi c34b7b1313 dinput: Use a properly initialized format in SetProperty. 2013-06-05 20:30:56 +02:00
Andrew Eikum 5135f80a27 dinput: Debug print DIEFFECT structure. 2013-05-24 11:01:33 +02:00
Gurmail Bassi 37169522f6 dinput: Update existing joystick values after setting the range property. 2013-04-16 15:10:30 +02:00
Andrew Talbot 6eecf4886f dinput: Avoid signed-unsigned integer comparisons. 2013-01-15 12:13:53 +01:00
Lucas Zawacki 478f0b6691 dinput: Implement DIPROP_INSTANCENAME for joystick. 2012-10-11 20:22:09 +02:00
Gerald Pfeifer 7432949693 dinput: Fix incorrect check in device_disabled_registry. 2012-08-27 11:31:12 +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 07f583478e dinput: Search for device objects of the correct type in BuildActionMap. 2012-02-29 10:21:54 +01:00
Lucas Fialho Zawacki 64c1f4778c dinput: Proper conversion of username parameters for Set and BuildActionMap. 2011-08-24 11:51:51 +02:00
Lucas Fialho Zawacki 4a20339346 dinput: In BuildActionMap, don't assign objects to actions mapped by an user. 2011-08-24 11:51:45 +02:00
Lucas Fialho Zawacki d175c1526f dinput: Common implementation for joystick, keyboard and mouse SetActionMap. 2011-08-24 11:51:42 +02:00
Lucas Fialho Zawacki 79bd7249e4 dinput: SetActionMap for joysticks. 2011-07-22 12:57:22 +02:00
Lucas Fialho Zawacki 31fdae5b4c dinput: BuildActionMap for all joysticks. For the moment only for buttons and axis. 2011-07-22 12:57:21 +02:00
Lucas Fialho Zawacki dc044e156d dinput: BuildActionMap and SetActionMap stubs for generic joystick. 2011-07-12 11:37:23 +02: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 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 de4a9bb319 dinput: COM cleanup - use helper function instead of direct typecast in base joystick class. 2011-01-10 11:01:51 +01:00
Vitaliy Margolen 7d650d0b28 dinput: Pass interface instead of this pointer to joystick poll callback. 2011-01-03 16:48:16 +01:00
Andrew Talbot e6649952fa dinput: Constify some variables. 2010-08-31 14:23:47 +02:00
Michael Stefaniuc 2004db1bb1 dinput: Don't use HIWORD to check if a REFGUID is a DIPROP. 2010-02-02 11:47:20 +01:00
Ričardas Barkauskas 258fd75b39 dinput: Fix counting non mapped axis as pov. 2009-10-21 16:05:56 +02:00
Vitaliy Margolen 9d86110327 dinput: Convert axis mapping array to int instead of BYTE. BYTE is unsigned and char isn't enough to store all possible axis values. 2009-09-08 13:07:09 +02:00
Vitaliy Margolen fa9c11dad3 dinput: Let driver specify default axis mapping. 2009-08-19 12:25:27 +02:00
Vitaliy Margolen 083d6e8474 dinput: Move setup_dinput_options into common place. 2009-08-19 12:24:52 +02:00
Vitaliy Margolen aee4237798 dinput: Remove redundant stuff. 2009-04-20 14:29:55 +02:00
Vitaliy Margolen fc4f1607a6 dinput: Make EnumDevices and GetObjectInfo consistent about GUIDs.
guidInstance should be the same from both places.
2009-04-20 14:29:49 +02:00
Aric Stewart 5dbe136027 dinput: Create generic joystick Acquire/Unacquire. 2009-03-10 14:40:19 +01:00
Aric Stewart e90e7e5b77 dinput: Move joystick mapping functions to the generic part. 2009-03-10 14:39:23 +01:00
Aric Stewart 94a5e0978d dinput: Move joystick Polling and Device State to the generic part. 2009-03-10 14:39:03 +01:00
Aric Stewart cbd34748e9 dinput: Move joystick productGuid and Name to the generic part. 2009-03-10 14:38:29 +01:00
Aric Stewart 620839d24e dinput: Begin joystick separation into a generic module. 2009-03-10 14:38:00 +01:00