dbrady
e2653cfbe5
fixed hat code validation.
2014-01-28 15:28:20 -08:00
Philipp Wiesemann
d66561a66d
Fixed comments in joystick implementation files claiming to be headers.
...
It seems comments were originally copied from SDL_sysjoystick.h.
2014-01-29 00:27:54 +01:00
Gabriel Jacobo
b878543be3
[Android] Fixes Bug 2370, don't send accelerometer changes when
...
Android_JNI_GetAccelerometerValues return SDL_FALSE (thanks to Jairo Luiz)
2014-01-27 17:59:19 -03:00
Gabriel Jacobo
196de652c5
Bug 2358 - [Android] Joystick Button Mappings are strange (fix by David Brady)
2014-01-23 08:44:25 -03:00
Gabriel Jacobo
3ae02c72db
Fixes 2356, [Android] SDL_JoystickGetAttached does not function
...
Also fix a potential NULL pointer access in android/SDL_SYS_JoystickGetGUID
--HG--
extra : source : 215d88851d3a51422efeb30d50476e8b34337a95
2014-01-21 18:20:12 -03:00
Ryan C. Gordon
63256a2384
Implemented the Dynamic API magic.
...
--HG--
extra : rebase_source : 38f639089d3d142895d5cf106919a0bfbb65c5ed
2013-12-09 16:03:18 -05: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
Sam Lantinga
8835c39374
Added alternative XBox 360 controller GUID on Linux
...
Leszek Godlewski
As described in the other thread
(http://lists.libsdl.org/pipermail/sdl-libsdl.org/2013-November/091997.html ),
I've run into a case of SDL2 not recognizing a wireless Xbox 360
controller receiver properly on Debian Linux amd64 testing.
Apparently, the generated GUID is slightly different.
Device in question:
Bus 001 Device 015: ID 045e:0291 Microsoft Corp. Xbox 360 Wireless
Receiver for Windows
2013-11-27 10:29:43 -08: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
Philipp Wiesemann
7297902ce0
Fixed unused local variable warning in joystick source for Android.
2013-12-24 20:00:58 +01:00
Philipp Wiesemann
9da82d88f2
Fixed implicit declaration of SDL_Log() warning in joystick source for Android.
2013-12-24 19:59:35 +01:00
Sam Lantinga
9289bbb732
Generate SDL_CONTROLLERDEVICEADDED events for controllers connected at startup
2013-12-23 15:10:03 -08:00
Gabriel Jacobo
99198c8c9f
[Android] Poll joysticks every three seconds
2013-12-12 14:55:33 -03:00
Gabriel Jacobo
ae184f5e89
[Android] Hotplugging support for joysticks
2013-12-10 16:24:11 -03: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
9054b03edb
Adds controllermap utility to test suite.
2013-12-02 19:35:04 -03:00
Gabriel Jacobo
64ff6df0b8
Adds SDL_GameControllerAddMappingsFromFile
2013-12-02 19:34:08 -03:00
Philipp Wiesemann
8106c1a455
Removed include of no more needed header.
2013-11-23 18:29:36 +01:00
Gabriel Jacobo
23434404ae
[Android] Fixes #2264 , handle joystick open/closed state properly
2013-11-23 09:47:25 -03:00
Gabriel Jacobo
c68f34799d
[Android] Try to improve handling of DPAD|GAMEPAD + KEYBOARD devices
...
It seems some devices report themselves as DPAD or GAMEPAD and KEYBOARD as well,
and we need to route different keycodes to different parts of SDL.
2013-11-19 10:00:05 -03:00
Philipp Wiesemann
2d9c5027be
Fixed unreachable return statement warning in gamecontroller source.
2013-11-18 23:43:15 +01:00
Philipp Wiesemann
6917b0dbe5
Fixed implicit function declaration warning in joystick source for Android.
2013-11-18 23:38:59 +01:00
Ryan C. Gordon
30c46bacc8
Renamed things named after BeOS to be named after Haiku instead.
...
--HG--
rename : src/audio/baudio/SDL_beaudio.cc => src/audio/haiku/SDL_haikuaudio.cc
rename : src/audio/baudio/SDL_beaudio.h => src/audio/haiku/SDL_haikuaudio.h
rename : src/filesystem/beos/SDL_sysfilesystem.cc => src/filesystem/haiku/SDL_sysfilesystem.cc
rename : src/joystick/beos/SDL_bejoystick.cc => src/joystick/haiku/SDL_haikujoystick.cc
rename : src/loadso/beos/SDL_sysloadso.c => src/loadso/haiku/SDL_sysloadso.c
rename : src/main/beos/SDL_BApp.h => src/main/haiku/SDL_BApp.h
rename : src/main/beos/SDL_BeApp.cc => src/main/haiku/SDL_BeApp.cc
rename : src/main/beos/SDL_BeApp.h => src/main/haiku/SDL_BeApp.h
rename : src/power/beos/SDL_syspower.c => src/power/haiku/SDL_syspower.c
rename : src/timer/beos/SDL_systimer.c => src/timer/haiku/SDL_systimer.c
rename : src/video/bwindow/SDL_BWin.h => src/video/haiku/SDL_BWin.h
rename : src/video/bwindow/SDL_bclipboard.cc => src/video/haiku/SDL_bclipboard.cc
rename : src/video/bwindow/SDL_bclipboard.h => src/video/haiku/SDL_bclipboard.h
rename : src/video/bwindow/SDL_bevents.cc => src/video/haiku/SDL_bevents.cc
rename : src/video/bwindow/SDL_bevents.h => src/video/haiku/SDL_bevents.h
rename : src/video/bwindow/SDL_bframebuffer.cc => src/video/haiku/SDL_bframebuffer.cc
rename : src/video/bwindow/SDL_bframebuffer.h => src/video/haiku/SDL_bframebuffer.h
rename : src/video/bwindow/SDL_bkeyboard.cc => src/video/haiku/SDL_bkeyboard.cc
rename : src/video/bwindow/SDL_bkeyboard.h => src/video/haiku/SDL_bkeyboard.h
rename : src/video/bwindow/SDL_bmodes.cc => src/video/haiku/SDL_bmodes.cc
rename : src/video/bwindow/SDL_bmodes.h => src/video/haiku/SDL_bmodes.h
rename : src/video/bwindow/SDL_bopengl.cc => src/video/haiku/SDL_bopengl.cc
rename : src/video/bwindow/SDL_bopengl.h => src/video/haiku/SDL_bopengl.h
rename : src/video/bwindow/SDL_bvideo.cc => src/video/haiku/SDL_bvideo.cc
rename : src/video/bwindow/SDL_bvideo.h => src/video/haiku/SDL_bvideo.h
rename : src/video/bwindow/SDL_bwindow.cc => src/video/haiku/SDL_bwindow.cc
rename : src/video/bwindow/SDL_bwindow.h => src/video/haiku/SDL_bwindow.h
extra : rebase_source : afd5a42647878e283dbee3a666cef2214f0e7941
2013-11-14 11:51:24 -05:00
Gabriel Jacobo
a2cdc5c163
[Android] Fixes bug 2217, better joystick axes handling on Android.
2013-11-11 10:15:35 -03:00
Sam Lantinga
1ef510f8cc
Fixed bug 1965 - Mac: dead code for supporting OS 10.4
...
Alex Szpakowski
The new patch removes all the truly obsolete code I could find. I tested on OS 10.8 and OS 10.5.
2013-11-10 17:56:07 -08:00
Gabriel Jacobo
90cd003e2a
Fixes bugs #2213 and #2214 , improves the Android joystick code button handling
2013-11-10 20:13:27 -03:00
Philipp Wiesemann
99684031ac
Changed function to return -1 through SDL_Error() instead of plain -1.
2013-11-10 14:47:05 +01:00
Philipp Wiesemann
3cf636ad92
Changed function to be static.
...
The function keycode_to_SDL() is only used in this file.
2013-11-10 14:44:50 +01:00
Philipp Wiesemann
1659944a67
Removed unused local variable to fix warning.
2013-11-10 14:42:41 +01:00
Sam Lantinga
de2ea4b8e8
Fixed signed/unsigned warning
2013-11-09 01:08:21 -08:00
Sam Lantinga
9608a25ab6
Added a Linux game controller mapping for the Valve Streaming Gamepad
2013-11-08 14:05:19 -08:00
Sam Lantinga
edb61cbae1
Make sure the joystick count is correct when the added and removed events are dispatched, in case someone is watching for them with an event filter.
2013-11-08 14:04:59 -08:00
Gabriel Jacobo
344ed6c986
Fixes Bug 1944 - Linux events, joysticks having only hat are not read
2013-11-06 09:48:45 -03:00
Gabriel Jacobo
7075ece4a5
Adds Joystick support for Android
...
This bumps the build SDK level to 12 (up from 10). Runtime requirements remain
the same (at API level < 12 joystick support is disabled).
Also enables building SDL for armv7 and x86.
2013-11-05 20:07:39 -03: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
Sam Lantinga
d3ebd00978
Fixed Y axis inversion on iOS; positive is up, negative is down.
2013-10-20 22:23:09 -07:00
Sam Lantinga
44dbed38ac
Fixed bug 2129 - fix for bug 2121 breaks linking for mingw and throws multiple warnings
...
Andreas Ertelt
The problem in question is caused by changeset 7771 (http://hg.libsdl.org/SDL/rev/4434498bf4b9 / https://bugzilla.libsdl.org/show_bug.cgi?id=2121 )
The redefinition of __inline__ (introduced by the addition of begin_code.h:128's "|| __STRICT_ANSI__") results in mingw's gcc throwing multiple
warning: always_inline function might not be inlinable [-Wattributes]
as well as a whole bunch of redefinitions of mingw internals which break linking of projects including the SDL2 headers.
2013-10-20 21:56:15 -07:00
Ryan C. Gordon
cc7596fc7e
Fix adding of XInput devices (thanks, Mitchell!)
...
Partially fixes Bugzilla #2126 .
2013-10-20 15:40:20 -04:00
Sam Lantinga
4a8f77da84
Fixed bug 2069 - Device addition/removal queries all USB devices rather than only HID devices.
...
Andreas Ertelt
SDL_dxjoystick.c is setting the classguid for device (dis)connect events to USB Devices in general:
dbh.dbcc_classguid = GUID_DEVINTERFACE_USB_DEVICE;
Wouldn't it make more sense to have it just subscribe to Hid device events? This would mean less meaningless events reaching the application.
2013-10-17 23:40:13 -07:00
Sam Lantinga
a999af88e9
Fixed building using MinGW
...
Our SDL_windows.h needed to be included before anything else so UNICODE is defined.
2013-10-17 23:02:29 -07:00
Sam Lantinga
e63559cffd
Report joystick added/removed events even if we don't have udev.
...
T. Joseph Carter
As discussed (possibly to death), the Linux joystick driver does not actually report events for added or removed joysticks when you haven't got udev support.
We simply cannot know about removed joysticks without udev. But we can (and we should) report adding them. This brings the legacy case in line with pretty much the rest of SDL's joystick drivers.
2013-10-10 20:58:20 -07:00
Sam Lantinga
6c7a589964
Only allocate a joystick instance ID once we know it's a joystick.
...
This fixes compatibility with code that assumes 0 based joystick instance IDs.
2013-10-06 20:39:23 -07:00
Sam Lantinga
ff55c5a474
Check for NULL joystick in SDL_JoystickGetGUID()
2013-10-06 13:49:23 -07:00
Sam Lantinga
5c03a1488f
Fixed bug where a Logitech wireless keyboard with built-in mouse touchpad didn't get recongized as both devices.
2013-10-05 21:15:55 -07:00
David Ludwig
643ea6407e
WinRT: renamed "windowsrt" directories to "winrt"
...
--HG--
rename : src/joystick/windowsrt/SDL_xinputjoystick.c => src/joystick/winrt/SDL_xinputjoystick.c
rename : src/main/windowsrt/SDL_winrt_main.cpp => src/main/winrt/SDL_winrt_main.cpp
2013-08-27 12:33:36 -04:00
David Ludwig
ef0a40b704
WinRT: build fixes and additional WinRT-related integrations with SDL 2.0.0
2013-08-13 20:09:52 -04:00