Commit Graph

801 Commits

Author SHA1 Message Date
Bruno Jesus ab5ad7dc0b dinput: Improve linux effect debugging.
Based on ideas by Elias Vanderstuyft.

Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-14 22:24:13 +09:00
Bruno Jesus 5ab0126f1d dinput: Fix phase conversion on periodic effects.
Based on idea by Elias Vanderstuyft.

Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-14 22:24:08 +09:00
Sebastian Lackner 2a5f05e316 dinput: Use variable of correct type to store HRESULT value.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-13 22:41:03 +09:00
Bruno Jesus 80fca2d86d dinput: Remove trailing space from debug string.
Spotted by Elias Vanderstuyft.

Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-13 12:47:57 +09:00
Bruno Jesus 0d17228ff9 dinput: Handle NULL effect envelope before testing its parameters.
Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-13 12:47:55 +09:00
Bruno Jesus f85e7d1716 dinput: Only complain for unsupported effect envelope if it really is useful.
Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-07 10:41:00 +09:00
Bruno Jesus 7027e9b268 dinput: Fix saturation range on condition effects.
Based on ideas by Elias Vanderstuyft.

The saturation is unsigned short, so the limit is 0xffff, not 0x7fff.

Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-26 10:40:06 +09:00
Bruno Jesus 4712c65f5b dinput: Simplify condition effect translation.
Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-26 10:40:02 +09:00
Bruno Jesus 4cf2ad9899 dinput: Don't give up if we can't translate the effect envelope.
Based on ideas by Elias Vanderstuyft.

Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-25 13:29:45 +09:00
Bruno Jesus 79b5883fce dinput: Simplify cartesian and fix polar direction calculations.
Based on formulas by Elias Vanderstuyft.

Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-25 13:29:37 +09:00
Bruno Jesus d0070935e4 dinput: Fix infinite effect length handling.
Based on ideas by Elias Vanderstuyft.

Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-25 13:29:28 +09:00
Bruno Jesus 7d88a12dc0 dinput: Fix calculation of too small periods for periodic effect.
Based on ideas by Elias Vanderstuyft.

Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-25 13:29:16 +09: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 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 4d816bdbcd dinput: Restore effect ID on error due to kernel < 3.14 bug.
Based on ideas by Elias Vanderstuyft

Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-23 12:18:08 +09:00
Bruno Jesus 327897992b dinput: Do not read/write past the struct for old DX versions.
Based on ideas by Elias Vanderstuyft.

Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-23 12:17:57 +09:00
Bruno Jesus 844a25ab38 dinput: Be more precise when returning effect upload errors.
Based on ideas by Elias Vanderstuyft.

Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-23 12:17:51 +09:00
Bruno Jesus c7e6b4fbec dinput: Dump the force feedback effect before upload.
Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-23 12:17:38 +09:00
Nikolay Sivov 3605cde8ea dinput: Explicitly check for -1 as open() failure code.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-23 12:17:26 +09: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 4cc193bba5 dinput: Dump the DIOBJECTDATAFORMAT flags.
Useful to check if the controller is asking for a specifc
DIDOI_POSITION* type axis.

Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-22 12:40:46 +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 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
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
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 cfd3076c31 dinput: Implement GetDeviceInfo(A) using the W version in the js driver.
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 7439f7948c dinput: Use a helper to read information files for the js device.
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
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
Bruno Jesus 58937117fb dinput: Add support for DIPROP_VIDPID property in Linux js implementation.
Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-15 12:56:31 +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
Bruno Jesus e3b783174d dinput: Add DirectInput8 device type names to debug.
Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-15 12:56:09 +09:00
Bruno Jesus 63284bf9b5 dinput: Fix some debug output.
Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-15 12:55:39 +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
Nikolay Sivov b610e422b3 dinput: Fix its vs it's typo.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-03 09:56:19 -05: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
Corentin Rossignon 4f01bcb85f dinput: Retrieve vendor ID and product ID in Linux joystick 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:24 +09:00
David Lawrie 49bf4f7eb6 dinput: Sort virtual joysticks by name on the Mac.
Signed-off-by: David Lawrie <david.dljunk@gmail.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-25 14:22:14 +09:00
David Lawrie c543c603a5 dinput: Alter function name and code style.
Signed-off-by: David Lawrie <david.dljunk@gmail.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-14 17:40:11 +09:00
David Lawrie 33c43473c0 dinput: Sort devices by location ID on the Mac.
Signed-off-by: David Lawrie <david.dljunk@gmail.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-14 17:40:11 +09:00
David Lawrie fef170af85 dinput: Print location ID in debugstr_device on the Mac.
Signed-off-by: David Lawrie <david.dljunk@gmail.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-14 17:40:10 +09:00
Andrey Gusev 3321a7faec dinput: Fix a typo in WARN() messages.
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-23 20:26:18 +09: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
Francois Gouget adb39b8fde dinput: Make ff_effect_direction_to_rad() static.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-22 22:23:42 +09:00
Michael Stefaniuc 48bf99ea89 dinput: Support IUnknown in the IDirectInputEffect COM object.
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-15 21:07:17 +09:00
Andrew Eikum 9934124917 dinput: Fix condition effect joystick offset calculation.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-15 10:14:57 +09:00