Commit Graph

4116 Commits (915a7e0341756e5fa1a823c5d6811bf57e555d47)

Author SHA1 Message Date
Sam Lantinga 3e4a8ce1c2 Fixed detecting the NVIDIA controller which shows up as both a mouse and a game controller 2015-04-01 19:18:56 -07:00
Joseba Garc?a Etxebarria 41961e4f31 Cast the result of calling getButtonState to an Integer 2015-04-02 00:55:45 +02:00
Sam Lantinga c5d9d1646f Added a game controller entry for the NVIDIA Controller 2015-04-01 18:22:42 -07:00
Edward Rudd c7ec9c1d85 handle the case where the ibus address can't be found. (prevents nasty crash) 2015-04-01 16:11:37 -04:00
Ryan C. Gordon 64237d7f01 Patched to compile on Android (I hope). 2015-04-01 14:45:09 -04:00
Ryan C. Gordon f9041771d5 Android: more separate-mouse-and-touch work.
This avoids a hint lookup for each mouse event we get by setting a static Java
variable from native code during our hint watcher callback.

Also attempts to do the right thing with mouse buttons if you happen to be
on an API14 (Ice Cream Sandwich, Android 4.0) or later device. We still
target API12 (Honeycomb MR1, Android 3.1) for SDL 2.0.4 though.

This isn't tested, so I'm pushing to see what the Android buildbot says. Stand
back, I'm a professional!
2015-04-01 12:14:56 -04:00
Sam Lantinga 236deab49b Fixed relative mouse motion moving farther and farther off screen. 2015-03-30 11:31:53 -07:00
Emmanuel Gil Peyrot b620df3ea7 Wayland: Specify the output we want to put our window on.
Fixes Bugzilla #2803.
2015-03-28 19:43:46 +01:00
Ryan C. Gordon a0e878aafb Minor input grab clarifications.
Clarify that grabbing the mouse only works with one window at a time; this was
always true at the system level, though SDL could previously get confused
by multiple simultaneous grabs, so now we explicitly break any existing
grab before starting a new one and document it as such.

Also track the window that is currently grabbed, and provide an API to query
for that window. This makes it easy to automate mouse ungrabbing at
breakpoints with gdb7's scripting, since the scripts can now know which window
to ungrab.

In 2.1, we should probably change this API to SDL_GrabInput(win) and
SDL_UngrabInput(void), or something.
2015-03-28 00:48:03 -04:00
Joseba Garc?a Etxebarria 7399062855 Renamed SDLGenericMotionListener back to SDLGenericMotionListener_API12 2015-03-27 18:09:51 -04:00
Philipp Wiesemann e7a659ebcc Removed not needed call to SDL_free(). 2015-03-25 22:48:57 +01:00
Philipp Wiesemann 37672303d3 Android: Removed outdated comment from source. 2015-03-25 22:47:22 +01:00
Ryan C. Gordon 03f5185eff Make the Dynamic API master switch more clear. 2015-03-25 11:18:54 -04:00
Ryan C. Gordon 1270247ccd Add a hint watch callback for SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH. 2015-03-25 10:59:10 -04:00
Ryan C. Gordon 83a44680cb Removed unnecessary SDL_log.h include. 2015-03-25 10:48:59 -04:00
Joseba Garc?a Etxebarria ca7b18e43f * More Android patch work 2015-03-24 21:02:28 +01:00
Joseba Garc?a Etxebarria 387fa5dcfb * Improve mouse support in Android. These changes require Android API v12 to compile 2015-03-24 20:45:29 +01:00
Ryan C. Gordon 87ef19c44a Keep track of maximum number of events in-flight in the SDL queue at once. 2015-03-25 10:19:10 -04:00
Ryan C. Gordon 3f9f0027bc Patched to compile on C89 compilers. 2015-03-24 14:40:31 -04:00
Ryan C. Gordon 672ccb4f54 Make the signal handler hint more generic. 2015-03-24 14:36:36 -04:00
Ryan C. Gordon a91a5604cd Added a hint to prevent SDL from installing signal handlers.
Fixes Bugzilla #2431.
2015-03-24 14:29:25 -04:00
Ryan C. Gordon 162ef5eae9 Cleanups in the joystick code.
Removed some redundant state and other confusions.

Fixes Bugzilla #2738.
2015-03-24 13:52:01 -04:00
Ryan C. Gordon 4a071b311b Mac: patched to compile with haptic subsystem disabled (thanks, Rodrigo!).
Fixes Bugzilla #2717.
2015-03-24 03:24:57 -04:00
Ryan C. Gordon 9470f4a2bd Better fixes for CMake subsystem enabling (thanks, Sebastian!).
Fixes Bugzilla #2875.
2015-03-24 03:21:57 -04:00
Ryan C. Gordon d9f378530b Make SDL error string formatting deal with nasty corner cases.
We continued looping while maxlen > 0, but maxlen was unsigned, so an overflow
 would make it a large number instead of negative. Fixed.

Some snprintf() implementations might return a negative value if there isn't
 enough space, and we now check for that.

Don't overrun the SDL error message buffer, if snprintf() returned the number
 of chars it wanted to write instead of the number it did.

snprintf is a portability mess, we should just never use the C runtime for it.

Fixes Bugzilla #2049.
2015-03-24 03:12:35 -04:00
Ryan C. Gordon 54f4725a12 Ran hardcoded game controller database through sort_controllers.py. 2015-03-24 02:48:16 -04:00
Ryan C. Gordon a300a73501 Added Logitect RumblePad 2 controller mapping for Linux (thanks, Nicholas!).
Fixes Bugzilla #2091.
2015-03-24 02:47:25 -04:00
Ryan C. Gordon 878c2324b1 winmm: Let audio callback buffer size be less than 1/4 second (thanks, Jon!).
Maybe this was here for Win9x? There's no reason to insert this much latency
by default.

Fixes Bugzilla #2835.
2015-03-24 02:13:25 -04:00
Ryan C. Gordon ac2bb3f200 configure script: fix recursive mutex test on Linux systems (thanks, Ozkan!). 2015-03-23 20:07:24 -04:00
Ryan C. Gordon c76130c9cc X11: Reenabled setlocale() and fork() for message boxes.
Fixes Bugzilla #1658.
2015-03-23 19:54:33 -04:00
Ryan C. Gordon 331a434fa1 Windows: Report window HDC in SDL_SysWMinfo.
Fixes Bugzilla #2668.
2015-03-23 19:47:08 -04:00
Philipp Wiesemann 528e48b980 Android: Removed not needed include statement. 2015-03-23 20:24:04 +01:00
Philipp Wiesemann 8a58e12f5f Updated test program for Emscripten. 2015-03-23 20:21:45 +01:00
Ryan C. Gordon b42c259752 Cocoa: Handle more cases of lost focus when Key window closes (thanks, Alex!).
Sort of fixes Bugzilla #1825 a little more. It's an ongoing effort.  :)
2015-03-22 01:25:12 -04:00
Philipp Wiesemann 49f33b41a7 Added missing SDL_DOLLARRECORD event type documentation in header. 2015-03-21 22:42:53 +01:00
Philipp Wiesemann 716ef0d5f2 Fixed confusing audio and touch events because of shared enumeration values. 2015-03-21 08:01:43 +01:00
Ryan C. Gordon eb49f8caa3 Patched to compile on OpenGL ES-based platforms. 2015-03-21 00:09:22 -04:00
Ryan C. Gordon 161e5d150f Whoops, lost a newline in here. 2015-03-20 23:29:09 -04:00
Ryan C. Gordon 3c76d2ff19 Several corrections to the CMake project files (thanks, Ozkan!).
Fixes Bugzilla #2732.
2015-03-20 21:57:15 -04:00
Ryan C. Gordon 34415c4557 Windows: support for OpenGL extension WGL_ARB_context_flush_control. 2015-03-20 12:23:53 -04:00
Emmanuel Gil Peyrot 89be609adf Wayland: Properly discover displays and their modes.
Fixes Bugzilla #2913.
2015-03-18 01:14:45 +01:00
Ryan C. Gordon e7ba78a35a CMake: Dependency variable for FUSIONSOUND_SHARED was wrong (thanks, Kaleb!).
Fixes Bugzilla #2055.
2015-04-07 21:52:22 -04:00
Ryan C. Gordon 5b6e064acd CMake: fix CHECK_OBJC_SOURCE_COMPILES to work with GCC (thanks, Ivan!).
Apparently -ObjC works with Clang, but -x objective-c works with both.

Fixes Bugzilla #2392.
2015-04-07 20:01:43 -04:00
Philipp Wiesemann 684f9e9603 Fixed typo in gesture README. 2015-04-07 23:00:56 +02:00
Ryan C. Gordon 3e9c2e7512 Another attempt to make MSVC's /W4 warning level cooperate with SDL_assert.
Fixes Bugzilla #2733.
2015-04-07 00:39:16 -04:00
Alex Baines a4458a7002 Fix DBus error message if IBus couldn't be initialized. 2015-03-20 19:47:03 +00:00
Ryan C. Gordon 8011557458 Refuse to make a window that's too large. Some systems (x11) freak out at this.
Fixes Bugzilla #2255.
2015-04-06 18:26:13 -04:00
Marc Di Luzio f5d96416ad Allow setting of GL_CONTEXT_RELEASE_BEHAVIOR when creating the GL context when GLX_ARB_context_flush_control is available.
This extension allows the user to specify whether a full flush is performed when making a context not current.
The only way to set this currently is at context creation, so this patch provides that functionality.
Defualt behaviour is set at FLUSH, as per the spec.

This patch does not contain the changes to WGL, appleGL or other platforms as I do not have access to GL 4.5 hardware on those platforms.

Full details on the use of KHR_context_flush_control can be found here:
https://www.opengl.org/registry/specs/KHR/context_flush_control.txt
2015-03-06 16:03:40 +00:00
Ryan C. Gordon 70191a9302 CMake: Don't search for the OpenGL library on Mac OS X. It's always there. 2015-03-20 11:51:03 -04:00
Ryan C. Gordon 182a7768e1 Audio hotplug fixes for winmm and XAudio2 backends. 2015-03-20 11:11:44 -04:00