Edward Rudd
f08ead552b
ignore hot plugs in mac haptic layer IF hap tics hasn't been initialized.
2014-02-07 09:35:13 -05:00
Ryan C. Gordon
6d0308a33f
Fixed crash on Windows if haptic isn't initialized when controllers are added.
2014-02-06 21:26:41 -05:00
Ryan C. Gordon
f9cfc5f8da
Fixed a typo.
2014-02-06 10:00:45 -05:00
Edward Rudd
7629872a1f
Fix device counting in HapticMouse and JoystickOpen routines. 0 is the first item in the list not the last
2014-02-06 09:35:44 -05:00
Edward Rudd
c593f2045c
fix indentation and spaces
2014-02-06 09:11:05 -05:00
Ryan C. Gordon
441bde12ca
Wired up haptic hotplugging for Windows DirectInput/XInput code.
2014-02-06 07:37:20 -05:00
Ryan C. Gordon
884709423e
Fixed memory leak.
2014-02-05 20:07:25 -05:00
Ryan C. Gordon
cece2c2b93
Make SDL_SYS_HapticMouse() count device indexes like HapticByDevIndex().
2014-02-05 18:36:40 -05:00
Ryan C. Gordon
2757186774
Cleanup some vi footer comments, rename new PRIVATE_* funcs to MacHaptic_*.
2014-02-05 01:02:09 -05:00
Edward Rudd
00970c2034
Implement new backend methods for haptic and hot plugging on OS X
2014-02-04 18:17:16 -05:00
Edward Rudd
e9fa1c76be
implement new backend method for Haptics in dummy driver
...
--HG--
extra : rebase_source : c4bfcf6d0283900051058989d633eae1eeeeb2c1
2014-02-04 16:50:34 -05:00
Edward Rudd
f4141728b7
Rework haptic backend to properly support hotplugging of haptic devices.
...
* currently only linux backend updated.
--HG--
extra : rebase_source : ef39ed7c749a66ed5a261cf63a88b4e80a7afc88
2014-02-04 15:44:09 -05:00
Sam Lantinga
d7940a513e
Fixed bug 2374 - Update copyright for 2014...
...
Is it that time already??
2014-02-02 00:53:27 -08:00
Ryan C. Gordon
63256a2384
Implemented the Dynamic API magic.
...
--HG--
extra : rebase_source : 38f639089d3d142895d5cf106919a0bfbb65c5ed
2013-12-09 16:03:18 -05:00
Ryan C. Gordon
82edee6971
Make internal SDL sources include SDL_internal.h instead of SDL_config.h
...
The new header will include SDL_config.h, but allows for other global stuff.
--HG--
extra : rebase_source : ddf4a4c0dc2c554b98c82700798f343cd91b16e3
2013-11-24 23:56:17 -05:00
Ryan C. Gordon
d89bf9b9ff
Moved a SDL_SetError() call elsewhere to avoid triggering it needlessly.
...
Otherwise, the XInput path would always trigger it in a harmless manner.
2013-10-23 15:54:12 -04:00
Sam Lantinga
4d7a5efe31
Fixed windows compile
2013-10-20 20:49:36 -07:00
Sam Lantinga
367ffcc3af
Added a macro SDL_TICKS_PASSED() to correctly compare two 32-bit tick values.
...
Went through the code and used the macro and fixed a couple places that were using incorrect timestamp comparisons.
2013-10-20 20:42:55 -07:00
Ryan C. Gordon
8d51830d7b
Fix some edge cases in XInput haptic timing.
2013-10-20 23:38:19 -04:00
Ryan C. Gordon
e9b771e52a
Backed out hg changeset b92b8c52946c. REFGUID is apparently a const type.
2013-10-20 16:03:11 -04:00
Ryan C. Gordon
ed8a935593
Patched to compile on non-C99 Microsoft compiler.
2013-10-20 16:02:24 -04:00
Ryan C. Gordon
613246f860
Patched to compile on Windows.
2013-10-20 16:01:10 -04:00
Ryan C. Gordon
4d56787378
Allow XInput haptics to run for SDL_HAPTIC_INFINITY time (thanks, Mitchell!).
...
Partially fixes Bugzilla #2126 .
2013-10-20 15:55:47 -04:00
Ryan C. Gordon
0c739575a3
Fixed goofy logic in haptic device comparison code.
...
Mitchell Keith Bloch did the research on this bug, and came up with a slightly
different patch than this.
Partially fixes Bugzilla #2126 .
2013-10-20 15:49:52 -04:00
Ryan C. Gordon
da32e8f576
Don't bother calling SDL_SYS_HapticEffectType() at all for XInput devices.
2013-10-20 15:45:48 -04:00
Sam Lantinga
08dfaaa2e6
Christoph Mallon: Remove pointless if (x) before SDL_free(x)
2013-08-29 08:29:21 -07:00
Ryan C. Gordon
cd94a10070
Fixed comment typo.
2013-08-28 17:12:07 -04:00
Gabriel Jacobo
298ce1c1a7
OCD fixes: Adds a space after /* (glory to regular expressions!)
2013-08-21 09:47:10 -03:00
Gabriel Jacobo
271e0d67c4
OCD fixes: Adds a space before */
2013-08-21 09:43:09 -03:00
Ryan C. Gordon
d4f386f5e3
Haptic: Let XInput update effects while they're still running.
2013-08-10 13:46:19 -04:00
Ryan C. Gordon
de6d6a5554
Removed no-longer-necessary comment.
2013-08-10 13:40:08 -04:00
Ryan C. Gordon
c35c4a6f18
Replaced SDL_HAPTIC_SQUARE with SDL_HAPTIC_LEFTRIGHT.
...
We needed a bit, so we're hoping no one needs this effect, especially when
it's fairly close to SDL_HAPTIC_SINE, we hope.
SDL_HAPTIC_LEFTRIGHT maps to XInput's functionality, so this removes the SINE
code for the XInput driver to keep things clean.
This also makes the simplified Rumble API use SDL_HAPTIC_LEFTRIGHT if
SDL_HAPTIC_SINE isn't available, to keep XInput working.
When we break the ABI, and can extend the supported capabilities field from
a Uint16, we'll add SDL_HAPTIC_SQUARE back in.
This patch is based on work by Ethan Lee.
2013-08-10 13:38:09 -04:00
Ryan C. Gordon
dd41037670
Backed out hg changeset 7f26fd1df927; docs were wrong, not the code.
2013-07-27 13:13:57 -04:00
Philipp Wiesemann
41edaa9b20
Fixed SDL_HapticOpened() returning -1 instead of 0.
...
According to header file it should only return 0 or 1.
2013-07-27 14:22:52 +02:00
Philipp Wiesemann
c2d852cb79
Fixed SDL_HapticRumblePlay() maybe working because of SDL_HapticUpdateEffect().
2013-07-27 13:52:16 +02:00
Philipp Wiesemann
eab7f43fc2
Corrected SDL_HapticUpdateEffect() returning 0 instead of index of effect.
...
According to documentation in header and wiki the index should be returned.
This change may break existing programs which assume only 0 means a success.
2013-07-27 13:39:43 +02:00
Sam Lantinga
dae53a0790
Improved error checking in the haptic system, preventing crashes in some cases.
...
Edgar Simo 2012-05-06 02:33:39 EDT
I recall that driver being buggy back in the day, but looking over the code there's a number of things being done wrong which I've fixed and it should now properly error out instead of crashing. Also make sure you initialize the haptic subsystem before using haptic commands (which I now more explicitly try to enforce).
2013-07-27 02:45:26 -07:00
Ryan C. Gordon
8328f33947
Make XInput haptic code respect effect timeouts.
...
This is really just a hack until this code expands to be a robust haptic mixer.
(This is also untested, beyond compiling. Sorry!)
--HG--
extra : rebase_source : 1ea0101273d96c6d82db9b603a575e265d4ee426
2013-07-20 18:51:49 -04:00
Philipp Wiesemann
905c71baec
Changed return value of internal function to shorten generic haptic source.
2013-07-20 11:01:03 +02:00
Sam Lantinga
98cdee1ebc
Fixed warning about unused variable.
2013-06-27 11:17:48 -07:00
Sam Lantinga
bc51b6f628
Fixed initializing the haptic system from an XInput joystick
...
Thanks to Franz Schrober for the fix inspiration.
2013-06-27 10:59:30 -07:00
Philipp Wiesemann
c1b6e05455
Fixed wrong documentation for haptic implementation.
2013-05-26 12:15:15 +02:00
Sam Lantinga
0cb6385637
File style cleanup for the SDL 2.0 release
2013-05-18 14:17:52 -07:00
Philipp Wiesemann
5b428b875f
Corrected spelling in C source files.
2013-05-01 11:42:29 +02:00
Philipp Wiesemann
2b271666be
Fixed SDL_HapticQuery() returning -1 as unsigned int if device is not valid.
...
The function now returns 0 which is the same as if no effects were supported.
This may be confusing in rare situations but will not matter most of the time.
2013-05-01 11:32:05 +02:00
Ryan C. Gordon
4f438b70a2
Make SDL_SetError and friends unconditionally return -1.
...
This lets us change things like this...
if (Failed) {
SDL_SetError("We failed");
return -1;
}
...into this...
if (Failed) {
return SDL_SetError("We failed");
}
Fixes Bugzilla #1778 .
2013-03-31 12:48:50 -04:00
Sam Lantinga
3afbe992d5
Removed Nintendo DS support since nobody has volunteered to maintain it for over a year.
2013-03-17 09:44:58 -07:00
Ryan C. Gordon
3d572bdf89
First shot at Windows XInput haptics.
...
--HG--
extra : rebase_source : 52e691a0917d173e891e67714a135373daea0ef5
2013-03-10 13:05:47 -04:00
Sam Lantinga
95dcfa4c28
Happy New Year!
2013-02-15 08:47:44 -08:00
Sam Lantinga
a1afe6c175
tree 5b46fd5b8c94
...
parent 971b278f0756
author Edward Rudd <urkle@outoforder.cc> 1358022907 18000
committer Edward Rudd <urkle@outoforder.cc> 1358022907 18000
revision 6819
branch default
Remove some redundant assigns
2013-02-11 21:47:13 -08:00