Commit graph

48 commits

Author SHA1 Message Date
Sam Lantinga
af32a2f4cd Updated copyright for 2019 2019-01-04 22:01:14 -08:00
Sam Lantinga
db39b4811f 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
346af016a5 Updated copyright for 2018 2018-01-03 10:03:25 -08:00
Sam Lantinga
49e3e7f731 Added support for the HOTAS Warthog throttle 2017-01-31 12:23:29 -08:00
Sam Lantinga
eb839a6e92 Added the HOTAS Warthog as a flight stick 2017-01-31 10:20:09 -08:00
Sam Lantinga
1b24bfad38 Updated copyright for 2017 2017-01-01 18:33:28 -08:00
Philipp Wiesemann
4db75ddb41 Fixed hotplug with more than one device in testjoystick program. 2016-12-16 22:58:32 +01:00
Sam Lantinga
3055d5af65 Added USB VID/PID information to the SDL test programs 2016-11-10 18:53:50 -08:00
Sam Lantinga
7ee8dda270 Updated copyright to 2016 2016-01-02 10:10:34 -08:00
Philipp Wiesemann
da4d0e4a52 Replaced tabs with spaces in test programs. 2015-11-25 21:39:28 +01:00
Ryan C. Gordon
03cb578e6e Added SDL_JoystickFromInstanceID() and SDL_GameControllerFromInstanceID().
--HG--
extra : amend_source : 110a5505509ddb9ecafed75abd89602986a99696
2015-11-14 12:35:45 -05:00
Alex Szpakowski
0023cbb086 Added initial support for MFi game controllers on iOS. 2015-09-20 23:08:36 -03:00
Sam Lantinga
56b58afdbe Updated the copyright year to 2015 2015-05-26 06:27:46 -07:00
Philipp Wiesemann
566df69b69 Added missing loop cancel for Emscripten in test programs. 2015-05-18 21:21:14 +02:00
Ryan C. Gordon
3ff618a9c7 Cleanups in the joystick code.
Removed some redundant state and other confusions.

Fixes Bugzilla #2738.

--HG--
extra : rebase_source : 35dd561553379e00eb8d169ce12ecc99393b2f84
2015-03-24 13:52:01 -04:00
Philipp Wiesemann
d9c3c62015 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
bf73cbded1 Fixed bug 2873 - Joystick test won't reload after reattach
lectem

-plug in the joystick
-start testjoystick 0
-unplug
-replug

The joystick is detected but doesn't enter the loop anymore since done==SDL_TRUE
2015-02-10 20:40:03 +01:00
Ryan C. Gordon
de88474dda 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!)

--HG--
extra : rebase_source : 97af74c8a5121e926ebe89f123536b5dd6681695
2014-12-18 00:19:52 -05:00
Gabriel Jacobo
04d8bb1069 A few more ANDROID for __ANDROID__ replacements 2014-05-10 15:57:09 -03:00
Sam Lantinga
d7940a513e Fixed bug 2374 - Update copyright for 2014...
Is it that time already??
2014-02-02 00:53:27 -08:00
Philipp Wiesemann
0319037b72 Fixed access of command line arguments on Android in two test programs. 2013-12-25 00:11:28 +01:00
Philipp Wiesemann
99bebc64ce Fixed missing return warning in test program source. 2013-12-24 19:55:41 +01:00
Gabriel Jacobo
b3fa9a3e55 [Android] Handle native thread finishing when not commanded from the Java side 2013-12-05 10:51:38 -03:00
Andreas Schiffler
16a40598f6 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
e2a14cf5dd Updated the copyright year for the test programs 2013-07-25 09:51:21 -07:00
Philipp Wiesemann
62c31ff5c3 Removed not needed SDL_WINDOW_SHOWN from test programs.
See bug #1667.
2013-07-20 21:47:16 +02:00
Sam Lantinga
0cb6385637 File style cleanup for the SDL 2.0 release 2013-05-18 14:17:52 -07:00
Sam Lantinga
282adb772b Fixed bug 1759 - Updates to testjoystick.c
ny00

A minor patch is attached, with the following few changes to testjoystick.c:
- Unused constant definitions have been removed.
- Output for all analog axes is drawn, even when there is an odd number of axes. (I have a controller with 5 analog axes.)
- Buttons are now drawn on two rows, so there's room for more. In fact, it has been used for testing a proposed joystick patch for Android, where large button ID numbers have been involved (20 and up). For more details see http://bugzilla.libsdl.org/show_bug.cgi?id=1700.
- A few adaptations have been done for the Android platform, assuming joystick support is ever applied to it. One of them is that the very first joystick (in the enumeration of all joysticks) is opened for testing, if there is any.
- It is now possible to quit from the calibration by pressing on a mouse button, tapping on a touchscreen or pressing/tapping on the "Back" button of an Android device. Technically, a press on a key identified by key code SDLK_AC_BACK results in that.
2013-03-19 22:25:02 -07:00
Andreas Schiffler
2e4dc511a0 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
Ryan C. Gordon
c773de800d Patched testjoystick.c to compile. 2012-12-11 16:53:59 -05:00
Sam Lantinga
a8fab2d5bf You can get window events after shutting down the window, so don't abort the program if that happens. 2012-12-11 10:50:26 -08:00
Ryan C. Gordon
41a157a462 Print stick GUID in testjoystick. 2012-12-11 11:59:29 -05:00
Ryan C. Gordon
ba2a2af364 Don't hang testjoystick if we failed to open the device in the first place. 2012-12-11 11:41:06 -05:00
Ryan C. Gordon
f8eaaf3a51 Cleaned out tabstops, other minor style nitpicks. 2012-12-11 11:28:29 -05:00
Ryan C. Gordon
0b1237e790 Allow testjoystick to quit, instead of looping on hotplug events forever. 2012-12-11 11:26:08 -05:00
Sam Lantinga
34b88dfaae Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds 2012-11-26 16:37:54 -08:00
Sam Lantinga
612c9439a4 Updated testjoystick for SDL 2.0 API - patch from simon 2012-10-14 00:24:07 -07:00
Ryan C. Gordon
1114169772 Cleaned up testjoystick.c, improved usage of renderer API, added colors! 2012-08-15 21:00:33 -04:00
Ryan C. Gordon
d0fbc25c13 Updated testjoystick.c for SDL2 API and draw more information.
Fixes Bugzilla #1570.

Thanks to Ondra Hosek for the patch!
2012-08-15 20:53:24 -04:00
Sam Lantinga
5ef4144446 Removed the SDL 1.2 compatibility API... we'll see how painful this is. 2012-01-22 18:11:41 -05:00
Sam Lantinga
b0660ba5ff SDL 1.3 is now under the zlib license. 2011-04-08 13:03:26 -07:00
Sam Lantinga
c6ac35a2bb Final merge of Google Summer of Code 2008 work...
Bring SDL to iPhone and iPod Touch
by Holmes Futrell, mentored by Sam Lantinga

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403222
2008-10-04 06:46:59 +00:00
Sam Lantinga
e2898c73af indent
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402544
2007-07-15 21:53:51 +00:00
Ryan C. Gordon
b98b6308d1 Merged r3292:3293 from branches/SDL-1.2: testjoystick verbose info.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402539
2007-07-15 17:25:59 +00:00
Sam Lantinga
0f030a1802 SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401938
2006-07-10 21:04:37 +00:00
Sam Lantinga
f2d67baf34 Moved DirectInput joystick code to 1.3 branch
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401821
2006-05-21 17:26:40 +00:00
Sam Lantinga
fe915b7a0a Closed bug #74
Added DirectInput joystick code, contributed by Glenn Maynard.

This fixes a problem with the Windows Multimedia joystick driver
not showing all 6 axes on a GameCube controller converter, which
was donated by Jacob Kolding.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401820
2006-05-21 16:47:41 +00:00
Sam Lantinga
2f110628a7 Initial revision
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401
2001-04-26 16:45:43 +00:00