Commit Graph

56 Commits

Author SHA1 Message Date
Bruno Jesus cc373223b0 dinput: Fix GetEffectStatus for Linux when effect was not downloaded.
Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-30 13:05:23 +01:00
Francois Gouget 49d42619fe dinput: Spelling and case fixes in comments.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-10 19:19:15 +01:00
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
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 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
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
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
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
Frédéric Delanoy 84fb23f476 dinput: Use BOOL type where appropriate. 2013-11-08 12:46:21 +01:00
Andrew Eikum 5135f80a27 dinput: Debug print DIEFFECT structure. 2013-05-24 11:01:33 +02:00
Lucas Zawacki 706d9df8d9 dinput: Don't trace DIEFFECT members if they don't contain valid data. 2012-04-11 18:15:57 +02:00
Marcel Hasler c47677fee5 dinput: Support INFINITE as number of effect iterations. 2012-02-02 09:55:47 +01:00
Marcus Meissner a19e31efd9 dinput: Mark internal symbols with hidden visibility. 2011-05-18 10:58:25 +02:00
Vincent Pelletier f1beea4f86 dinput: Effect length can actually be 0.
This fixes force feedback devices slamming for 10ms at full strength, as
attack is an absolute value, not a factor of effect level.
2011-03-31 12:38:28 +02:00
Vincent Pelletier 296b67f556 dinput: Ramp from lStart to lEnd, not lStart to lStart. 2011-03-28 17:08:53 +02:00
Vitaliy Margolen 02be0aee72 dinput: Fix typo. Found by clang. 2011-01-25 12:37:53 +01:00
Vitaliy Margolen b66e00cb09 dinput: COM cleanup - return interface instead of typecasting This. 2011-01-10 10:58:19 +01:00
Vitaliy Margolen 0adc470854 dinput: COM cleanup - use interface instead of lpvtbl in joystick effects. 2011-01-03 16:46:25 +01:00
Michael Stefaniuc 127733ebda dinput: Remove explicit cast to long as it happens implicitly.
LPDIEFFECT->rglDirection is a LPLONG.
2010-05-18 18:42:09 +02:00
Vincent Pelletier 7e7970830f dinput: Fix effect direction conversion from DIEFF_CARTESIAN coordinates. 2009-02-03 12:40:07 +01:00
Vincent Pelletier befb0a06b1 dinput: Move gain support from effect to device. 2009-02-02 15:21:44 +01:00
Michael Stefaniuc c0d2a21dd1 dinput: Remove superfluous pointer casts. 2009-01-28 12:30:51 +01:00
Vincent Pelletier e5abaf9f97 dinput: Clamp lMagnitude to -10000..10000 range. 2009-01-26 14:52:28 +01:00
Vincent Pelletier 15a33ab209 dinput: Fix gain-related bugs. 2009-01-26 14:52:01 +01:00
Vincent Pelletier d2969fef92 dinput: Add effect gain support. 2009-01-20 12:58:14 +01:00
Alexandre Julliard f6eb03d6c6 dinput: Avoid size_t in traces. 2009-01-08 13:12:08 +01:00
Andrew Talbot c1d5dfe84b dinput: Sign-compare warnings fix. 2008-09-30 10:57:23 -05:00
Andrew Talbot 0993244b08 dinput: Remove unneeded address-of operators from array names. 2008-07-10 12:19:39 +02:00
Vitaliy Margolen a478c4fe25 dinput: Freed effect should remove itself from the parent's list of effects. Add tests. 2008-07-07 12:11:24 +02:00
Vitaliy Margolen 91036a04a2 dinput: Stop and unload effect when freeing it. 2008-07-07 12:11:24 +02:00
Vitaliy Margolen 85e2aa1d8a dinput: Add more traces. Prevent some traces from dereferencing NULL pointer. 2008-07-07 12:11:24 +02:00
Andrew Talbot da0a48d235 dinput: Assign to structs instead of using memcpy. 2008-03-01 12:02:19 +01:00
Marcus Meissner f1a688a946 dinput: Removed superflous < 0 check. 2008-02-16 15:11:12 +01:00
Andrew Riedi e0740a7a60 dinput: DPRINTF -> TRACE. 2007-12-12 13:48:57 +01:00
Andrew Talbot 1067f56ca5 dinput: Use bitwise NOT not logical NOT. 2007-11-27 12:29:52 +01:00
Andrew Talbot 5e1ca16052 dinput: Constify some variables. 2007-04-24 11:53:46 +02:00
Alexandre Julliard 4ae5b9fd33 dinput: Undefine SW_MAX to avoid possible conflicts with winuser.h. 2007-01-22 12:11:04 +01:00
Francois Gouget 30e44c85c8 Assorted spelling fixes. 2006-11-07 15:25:24 +01:00
Vitaliy Margolen 7123f3e80e dinput: Win64 printf format warning fixes. 2006-10-09 12:53:41 +02:00