Commit Graph

39 Commits

Author SHA1 Message Date
Sam Lantinga
a7f26f9e6c Added HIDAPI joystick drivers for more consistent support for Xbox, PS4 and Nintendo Switch Pro controller support across platforms.
Added SDL_GameControllerRumble() and SDL_JoystickRumble() for simple force feedback outside of the SDL haptics API
2018-08-09 16:00:17 -07:00
Sam Lantinga
a9072159b2 Updated copyright for 2018 2018-01-03 10:03:25 -08:00
Sam Lantinga
d77ab77a7a Updated copyright for 2017 2017-01-01 18:33:28 -08:00
Philipp Wiesemann
eb909cf972 Fixed compiling of testgamecontroller program with C++. 2016-12-28 20:11:29 +01:00
Sam Lantinga
bdd7e6b176 Split controller axes into positive and negative sides so each can be bound independently.
Using this a D-Pad can be mapped to a thumbstick and vice versa.
Also added support for inverted axes, improving trigger binding support
2016-12-27 01:39:07 -08:00
Sam Lantinga
800baf2915 Only print out the controller mappings if we're not going to test a controller 2016-12-09 04:17:10 -08:00
Sam Lantinga
f660677b48 Added an API to iterate over game controller mappings 2016-11-29 06:36:57 -08:00
Sam Lantinga
2927b15bca Added USB VID/PID information to the SDL test programs 2016-11-10 18:53:50 -08:00
Sam Lantinga
7b6ea53777 Fixed black screen on Steam Link 2016-10-13 04:01:25 -07:00
Philipp Wiesemann
9335a5b22f Fixed compiling of three test programs with C++. 2016-09-21 23:06:38 +02:00
Philipp Wiesemann
48c993965d Fixed memory leak in game controller test program. 2016-05-05 22:05:21 +02:00
Sam Lantinga
255c182471 Updated copyright to 2016 2016-01-02 10:10:34 -08:00
Philipp Wiesemann
9677d33467 Replaced tabs with spaces in test programs. 2015-11-25 21:39:28 +01:00
Ryan C. Gordon
87c985cd18 Added SDL_JoystickFromInstanceID() and SDL_GameControllerFromInstanceID(). 2015-11-14 12:35:45 -05:00
Alex Szpakowski
4a556c4c01 Added initial support for MFi game controllers on iOS. 2015-09-20 23:08:36 -03:00
Sam Lantinga
78f2198e6c Updated the copyright year to 2015 2015-05-26 06:27:46 -07:00
Philipp Wiesemann
89eb93d305 Removed redundant NULL check in test program. 2015-05-21 21:27:53 +02:00
Philipp Wiesemann
a96660cbde Added missing loop cancel for Emscripten in test programs. 2015-05-18 21:21:14 +02:00
Philipp Wiesemann
4c8d5e20a7 Fixed test programs for joystick not exiting on events after first disconnect.
Exit was broken since the main loop extraction needed for Emscripten support
because the former local but now global variables were not reset correctly.
2015-02-12 21:40:53 +01:00
Philipp Wiesemann
024f1a0155 Fixed compile errors in example programs. 2014-12-25 21:42:56 +01:00
Ryan C. Gordon
a9626cb76e Initial merge of Emscripten port!
With this commit, you can compile SDL2 with Emscripten
( http://emscripten.org/ ), and make your SDL-based C/C++ program
into a web app.

This port was due to the efforts of several people, including: Charlie Birks,
Sathyanarayanan Gunasekaran, Jukka Jylänki, Alon Zakai, Edward Rudd,
Bruce Mitchener, and Martin Gerhardy. (Thanks, everyone!)
2014-12-18 00:19:52 -05:00
Philipp Wiesemann
d38c5d2aaf Fixed warnings about unused functions in test program. 2014-08-20 22:44:15 +02:00
Sam Lantinga
29e7293ecc Fixed assertion loading button.bmp in testgamecontroller 2014-03-29 12:27:27 -07:00
Ryan C. Gordon
e450b2f9d9 Make controllermap, etc, work on platforms with hardcoded window sizes.
This makes sure everything renders correctly, even if, say, an Android device
gives you a certain "window" size no matter what you ask for.
2014-02-10 11:29:48 -05:00
Ryan C. Gordon
c18be74a8e Replace testgamecontroller visualization mode with something more useful. 2014-02-10 01:41:58 -05:00
Sam Lantinga
dba255c1e5 Fixed bug 2374 - Update copyright for 2014...
Is it that time already??
2014-02-02 00:53:27 -08:00
Sam Lantinga
ca345234a8 Changed testgamecontroller to wait for controllers to be reattached, the way testjoystick does. 2013-12-23 15:55:08 -08:00
Gabriel Jacobo
a0af4271a0 Adds controllermap utility to test suite. 2013-12-02 19:35:04 -03:00
Ryan C. Gordon
6812b6f714 Fixed testgamecontroller output to make sense. 2013-08-28 00:07:02 -04:00
Andreas Schiffler
7582a71d05 Fix bug 2034: replace printf by SDL_Log in tests; update loopwave VS solution: copy missing dependency 2013-08-14 23:30:10 -07:00
Sam Lantinga
7eff345ecb Updated the copyright year for the test programs 2013-07-25 09:51:21 -07:00
Philipp Wiesemann
aa1fee4fdb Removed not needed SDL_WINDOW_SHOWN from test programs.
See bug #1667.
2013-07-20 21:47:16 +02:00
Sam Lantinga
0d9b661db8 File style cleanup for the SDL 2.0 release 2013-05-18 14:17:52 -07:00
Jørgen P. Tjernø
6337624232 Improve testgamecontroller output & robustness. 2013-04-03 16:48:23 -07:00
Ryan C. Gordon
b7b7f889c5 Changed the game controller enum types to match SDL naming conventions. 2013-02-25 00:56:21 -05:00
Ryan C. Gordon
1da268a909 Minor cleanup. 2013-02-25 00:47:47 -05:00
Ryan C. Gordon
efb6ccb1ee Made testgamecontroller minimally more useful. 2013-02-24 22:57:25 -05:00
Andreas Schiffler
2690692f25 Fix compiler warning; minor harness driver cleanup; fix test build for SDL versions compiled with --disable-joystick or --disable-haptic 2012-12-22 20:43:51 -08:00
Sam Lantinga
23950f0183 Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds 2012-11-26 16:37:54 -08:00