Philipp Wiesemann
8869fe78be
Added handling of NULL as input for SDL_GameControllerMapping().
...
For consistency with the similar functions getting SDL_GameController as input.
Also NULL is no SDL_GameController and therefore can not have a mapping anyway.
2014-10-26 17:53:16 +01:00
Philipp Wiesemann
81958288cc
Removed two wrong documentation comments from gamecontroller source.
...
No replacement because correct documentation is already in SDL_gamecontroller.h.
2014-10-26 17:46:11 +01:00
Philipp Wiesemann
788b558bc8
Fixed wording in SDL_GameControllerAddMappingsFromRW() error message.
2014-10-26 17:44:00 +01:00
Sam Lantinga
9d42bf534d
Fixed mingw64 build and warnings
2014-07-07 10:26:28 -07:00
Sam Lantinga
9cdeec59f3
Split the XInput and DirectInput code so Windows RT can use the existing XInput support.
...
--HG--
rename : src/audio/directsound/directx.h => src/core/windows/SDL_directx.h
rename : src/haptic/windows/SDL_syshaptic.c => src/haptic/windows/SDL_windowshaptic.c
rename : src/haptic/windows/SDL_syshaptic_c.h => src/haptic/windows/SDL_windowshaptic_c.h
rename : src/joystick/windows/SDL_dxjoystick.c => src/joystick/windows/SDL_dinputjoystick.c
rename : src/joystick/windows/SDL_dxjoystick_c.h => src/joystick/windows/SDL_dinputjoystick_c.h
rename : src/joystick/windows/SDL_dxjoystick_c.h => src/joystick/windows/SDL_windowsjoystick_c.h
2014-07-03 15:39:55 -07:00
Sam Lantinga
dc434901da
Fixed bug 2553 - Add support to all XInput devices
...
This adds support for all XInput devices, exposed through the SDL joystick API.
The button and axis reporting for XInput devices has been changed to match DirectInput and other platforms.
The game controller xinput mapping has been updated so this change is seamless.
There is a new hint, SDL_HINT_XINPUT_USE_OLD_JOYSTICK_MAPPING, for any applications that have hardcoded the old xinput button and axis set. This hint will be removed in SDL 2.1.
2014-06-24 13:31:25 -07:00
Sam Lantinga
bb480c2b0a
Updated coding style to match the rest of SDL
2014-05-13 11:32:36 -07:00
Sam Lantinga
a7d2ebb8d6
Integrated David Ludwig's support for Windows RT
2014-03-09 11:36:47 -07:00
Sam Lantinga
211b54deef
Fixed line endings on WinRT source code
2014-03-09 11:06:11 -07:00
Sam Lantinga
cff6eb5155
Null termnate the pUserMappings variable to prevent memory corruption.
2014-02-28 16:24:41 -08:00
Gabriel Jacobo
ac487a8eec
Fixes #2417 , memory leak in SDL_gamecontroller.c (thanks Leonardo!)
2014-02-24 10:00:10 -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
David Ludwig
ebfac58560
WinRT: merged with latest SDL 2.x/HG code
...
SDL 2.x recently accepted patches to enable OpenGL ES 2 support via Google's ANGLE library. The thought is to try to eventually merge SDL/WinRT's OpenGL code with SDL-official's.
2013-11-28 22:09:21 -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
Philipp Wiesemann
51f82e27dd
Changed return -1 after SDL_SetError() to return SDL_SetError().
2013-12-25 17:02:15 +01:00
Sam Lantinga
9289bbb732
Generate SDL_CONTROLLERDEVICEADDED events for controllers connected at startup
2013-12-23 15:10:03 -08:00
Sam Lantinga
db521ea67c
Fixed detecting the wired XBox 360 controller on Linux
...
Also added some more debug output to detect issues
2013-12-06 09:13:31 -08:00
Sam Lantinga
4c35a7b408
Fixed compiler warning on Visual Studio
2013-12-06 08:24:00 -08:00
Gabriel Jacobo
137f4aedc1
Adds SDL_GameControllerAddMappingsFromRW, updates controllermap
...
SDL_GameControllerAddMappingsFromFile is now a convenience macro.
controllermap can now skip bindings by pressing space or clicking/touching the
screen.
2013-12-03 12:01:28 -03:00
Gabriel Jacobo
64ff6df0b8
Adds SDL_GameControllerAddMappingsFromFile
2013-12-02 19:34:08 -03:00
Philipp Wiesemann
2d9c5027be
Fixed unreachable return statement warning in gamecontroller source.
2013-11-18 23:43:15 +01:00
David Ludwig
59df93166d
WinRT: merged with SDL 2.0.1 codebase
2013-10-27 21:26:46 -04:00
Sam Lantinga
20e65317fa
Fixed some warnings building for 64-bit Windows
2013-10-21 01:16:16 -07:00
David Ludwig
88461d442a
WinRT: merged with SDL 2.0.0 codebase (aka. SDL hg rev d6a8fa507a45)
...
--HG--
rename : README.iOS => README-ios.txt
2013-08-12 22:29:55 -04:00
Ryan C. Gordon
6f21990987
Reworked XInput and DirectInput joystick code.
...
Now multiple XInput controllers map correctly to device indexes instead of grabbing
the first available userid, and are completely separated out from DirectInput.
Also, the hardcoded limitation on number of DirectInput devices is gone. I don't
expect there to really ever be more than eight joysticks plugged into a machine, but
it was a leftover limitation for a static array we didn't actually use anymore.
Fixes Bugzilla #1984 . (etc?)
--HG--
extra : rebase_source : 103ce667c1cdd87a3691c9dd9eea2318bad908c8
2013-08-28 16:43:47 -04:00
Sam Lantinga
54d87dfc28
SDL
...
- detect that you tried to open a gamecontroller in xinput mode and failed, then re-get the mapping for the dinput variant you did open (and most likely now just fail the open)
CR: SamL
2013-08-21 10:32:04 -07:00
Gabriel Jacobo
271e0d67c4
OCD fixes: Adds a space before */
2013-08-21 09:43:09 -03:00
Sam Lantinga
06741a5761
Moved the game controller database to a separate file and added a script to sort the entries so we can easily check for duplicates
2013-07-12 10:44:55 -07:00
Sam Lantinga
22aec9f625
Oops, that was supposed to be in the Linux section.
2013-07-12 08:21:28 -07:00
Sam Lantinga
8522bf8e38
Fixed name of the Logitech F710 controller
2013-07-11 23:21:09 -07:00
Sam Lantinga
0b2d15eb61
Fixed bug 1853 - Gamecontroller patch to add support for Logitech F510 (Linux)
...
Gerry JJ
Same mapping as for F710. Xinput mode only since I couldn't get Dinput mode to work at all.
2013-07-11 23:20:29 -07:00
Sam Lantinga
80917f1537
Removed redundant "Controller" names from gamepads, added mapping for Logitech F710 in DirectInput mode
2013-06-07 09:40:07 -07:00
Jørgen P. Tjernø
24fc22545b
Mac: Fix invalid PS3 controller mapping.
...
PS3 controller had swapped D-Pad down & left buttons, as well as X & Y buttons.
Thanks to Alex Szpakowski for the bug report and fix.
Fixes http://bugzilla.libsdl.org/show_bug.cgi?id=1891
2013-06-05 12:48:44 -07:00
Edward Rudd
acb14cfc03
Add trigger value adjustment code to the SDL_GameControllerGetAxis code as well.
...
- fixes Trigger values when polling instead of using event driven
2013-05-30 22:14:24 -04:00
Edward Rudd
3d874237bc
add in Controller configs for Logitech F510 for OS X / Linux
...
--HG--
extra : rebase_source : 68a7469d9e85d5f090d0299abed42f8ed577499a
2013-05-30 10:42:52 -04:00
David Ludwig
b919f57c12
WinRT: added preliminary joystick / game controller support (minus hotplugging)
2013-05-19 23:30:34 -04:00
Sam Lantinga
0cb6385637
File style cleanup for the SDL 2.0 release
2013-05-18 14:17:52 -07:00
Sam Lantinga
bc7136f5ba
Martin Gerhardy added support for the Jess Technology USB Game Controller
2013-05-16 00:48:20 -07:00
Philipp Wiesemann
e83262a725
Corrected spelling in C source files.
2013-05-01 11:59:54 +02:00
Philipp Wiesemann
a4432d3cdf
Corrected confusing indentation in C source file.
2013-04-29 23:50:27 +02:00
Jørgen P. Tjernø
e4b6ac8025
Fix overflow in recent gamecontroller trigger change.
2013-04-19 16:02:16 -07:00
Jørgen P. Tjernø
12a26f7c35
Make gamecontroller triggers have values in 0 - 32767.
...
This changes the old behavior of having values in the -32768 - 32767
range, like regular joystick axis. Now "button as axis" triggers (like
on Logitech controllers) and regular axis triggers (like on Xbox
controllers) have the same resting value, 0.
2013-04-19 10:51:21 -07:00
Jørgen P. Tjernø
cbd1884115
Add 3 Logitech gamecontroller mappings for Mac OS X.
2013-04-03 16:48:20 -07:00
Jørgen P. Tjernø
4926901d46
Add new controller mappings for Windows.
2013-04-02 18:09:30 -07: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
aff63d09c2
Added support for the GameStop Gamepad
2013-03-25 12:04:16 -07:00
Jørgen P. Tjernø
ae480eecfd
Missing comma in one gamepad mapping.
2013-03-12 18:28:40 -07:00
Jørgen P. Tjernø
fc436807a8
Add GameController mappings for popular controllers.
...
This adds mappings for:
- Another type of wired X360 controller
- A wireless X360 controller
- Logitech F710 (XInput and DInput modes)
- Logitech F310 (XInput mode)
- Logitech Cordless RumblePad 2
2013-03-12 18:28:36 -07:00
Sam Lantinga
7f2340dc6a
Don't re-read the hints when opening the game controller. Instead use SDL_GameControllerAddMapping() to add hints after initialization.
2013-03-08 10:09:51 -08:00
Sam Lantinga
0707530b35
Load the game controller mapping hint when opening a game controller.
2013-03-07 15:37:08 -08:00