Commit Graph

5456 Commits

Author SHA1 Message Date
Ryan C. Gordon
e074a89b46 Linux joystick: Look at entire axis namespace for controls (thanks, "spaz16"!).
This apparently has fallout: the PS4 (and maybe PS3?) controllers apparently
report some bogus axes, but it won't change the axes we currently expect, and
thus the game controller config string is still stable.

Fixes Bugzilla #2719.
2015-05-26 12:03:51 -04:00
Sam Lantinga
848583ddda Fixed bug 2869 - Controllers connected on launch are reported twice.
Since all device detection/removal happens on the main thread now, post events inline with when the status changes occur.
Also fixed rare cases when joystick API functions could return data about removed joysticks when called with a device index.
2015-05-26 08:52:02 -07:00
Ryan C. Gordon
556cc2eb04 Cocoa: Fixed relative mouse mode when app loses/regains focus (thanks, Eric!).
Fixes Bugzilla #2718.
2015-05-26 11:38:04 -04:00
Ryan C. Gordon
86485f1f8d Windows: don't beep on Alt-* key combos (Thanks, historic_bruno!).
Fixes Bugzilla 2669.
2015-05-26 11:08:30 -04:00
Ryan C. Gordon
72d8a0f10c Cocoa: report SDL_WINDOWEVENT_EXPOSED events to the app (thanks, David!).
Fixes Bugzilla #2644.
2015-05-26 11:01:19 -04:00
Ryan C. Gordon
af0103be90 Cocoa: don't fail outright if we see an unknown display format.
Just treat it as ARGB8888.
2015-05-26 09:55:41 -04:00
Ryan C. Gordon
9b0ba414e3 Don't look for (and fail without) glGetIntegerv() until we need to.
Fixes Bugzilla #2615.
2015-05-26 10:25:15 -04:00
Sam Lantinga
78f2198e6c Updated the copyright year to 2015 2015-05-26 06:27:46 -07:00
Sam Lantinga
8f14ca455d Wait for devices to finish initializing when inserted, before using them. Fixes hotplug issue with XBox 360 game controller. 2015-05-25 16:22:09 -07:00
Sam Lantinga
4ff77d6674 Added support for Razer Serval Bluetooth mode 2015-05-25 14:52:41 -07:00
Victor Luchits
5b3b340ff9 Fix duplicate raw mouse events with XInput2
Make XGrabPointer calls in X11_SetWindowGrab and X11_CaptureMouse
consistent by passing False to owner_mask along with proper event_mask.
2015-05-14 14:40:56 +03:00
Sam Lantinga
68e32dd44f Added game controller support for the Razer Serval 2015-05-20 16:28:21 -07:00
Alex Szpakowski
1e7b0cd265 Code style cleanup in the GLES and GLES2 render backends. 2015-05-16 17:35:36 -03:00
Alex Szpakowski
ebc3d92415 iOS: Added support for SDL_DisableScreenSaver and SDL_EnableScreenSaver. 2015-05-16 16:55:56 -03:00
Philipp Wiesemann
1d1978bca0 Emscripten: Fixed wrong source comment and updated web link. 2015-05-16 21:15:27 +02:00
Alex Szpakowski
4d7917e6ed Mac: Use CoreFoundation headers instead of Carbon headers, in GetPowerInfo code. 2015-05-16 12:05:42 -03:00
Sam Lantinga
ab8a05e9ce Added a userdata parameter to SDL_SetWindowsMessageHook() 2015-05-13 22:39:32 -07:00
Sam Lantinga
7aacea735d Fixed Mac and Linux builds 2015-05-13 22:39:27 -07:00
Sam Lantinga
af8c286153 Added SDL_SetWindowsMessageHook() to facilitate full IME support on Windows 2015-05-13 22:39:20 -07:00
Sam Lantinga
67dc1eb7d2 Added generic xinput fallback for XBox compatible controllers on Linux 2015-05-13 22:37:26 -07:00
Alex Szpakowski
48a5682bef Refactored SDL_EGL_CreateContext: It now supports context flags and OpenGL ES 3+ contexts, and its behavior more closely matches the GLX and WGL context creation code.
Improved the code style consistency of SDL_egl.c.

Fixes bugzilla #2865.
2015-05-11 21:03:36 -03:00
Philipp Wiesemann
2f2460578f Android: Fixed empty parameter list in signatures of internal functions. 2015-05-09 22:42:23 +02:00
Philipp Wiesemann
91306cc871 Emscripten: Fixed touch coordinates not being normalized. 2015-05-06 21:10:48 +02:00
Alex Szpakowski
1c3d56dcab Fixed SDL_GL_GetAttribute queries for framebuffer component sizes in Core Profile OpenGL contexts.
Fixes bugzilla #2060.
2015-05-06 12:54:51 -03:00
Alex Szpakowski
fc93c1bcb1 Replaced all remaining uses of NSAutoreleasePool with @autoreleasepool blocks (bugzilla #2680.) 2015-05-05 19:01:55 -03:00
Alex Szpakowski
036f58d8e7 Fixed the window offset on iOS when resuming an app with a borderless or fullscreen window that has the on-screen keyboard visible. 2015-05-05 16:20:11 -03:00
Alex Szpakowski
6d5dc25059 Fixed a crash on iOS when none of the orientations in Info.plist match the SDL window's actual orientation.
Fixes bug #2967.
2015-05-05 16:16:10 -03:00
Sam Lantinga
6106edefcf Fixed bug 2976 - Fix RGBA<->RGBA blit that was broken with the optimization from Bug 11
id.zeta

The optimization from Bug 11 added a code branch on cases where the source RGB masks match the destination RGB masks and a optimized blit function Blit4to4MaskAlpha that always overrides the source alpha info would be chosen. Unfortunately, the branch also errorneously took over the RGBA<->RGBA blitting cases where the source alpha info should be copied, while they would instead get overriden in Blit4to4MaskAlpha.

The attached patch fixes that by handling the RGBA<->RGBA cases correctly in that branch with the original BlitNtoNCopyAlpha as well as uses an optimized Blit4to4CopyAlpha along the same vein.
2015-05-04 21:47:40 -07:00
Ryan C. Gordon
ea51063e9f X11: send keypress events before textinput events. 2015-05-01 01:20:28 -04:00
Philipp Wiesemann
ab66b7f201 Android: Deactivated debug log messages on joystick device events. 2015-04-30 21:45:29 +02:00
Dimitris Zenios
f64f0c86e5 X11: Use our own cut-buffer for intermediate clipboard storage.
XA_CUTBUFFER0 is not defined for holding UTF8 strings.
2015-04-26 13:53:46 +03:00
Wander Lairson Costa
1051eadb7a Add an entry for X11 "/" key for Brazilian keyboard.
SDL2 reports the following message when we type the "/" on br-abnt2 keyboards:

The key you just pressed is not recognized by SDL. \
To help get this fixed, please report this to the SDL mailing list \
<sdl@libsdl.org> X11 KeyCode 97 (89), X11 KeySym 0x2F (slash).

That's because the corresponding entry in the scancodes table is
marked with value SDL_SCANCODE_UNKNOWN.

This commit fixes that adding the value SDL_SCANCODE_SLASH for this entry.
2014-06-05 11:55:37 -03:00
Ryan C. Gordon
496c226acf Cleaned up the macro salsa in the Windows timer code.
- Removed USE_GETTICKCOUNT code; it's never used now.
- Reduced the number of preprocessor checks for WinRT.
- Renamed timeSetPeriod() so it doesn't look like a Win32 API call.
2015-04-20 13:43:24 -04:00
Ryan C. Gordon
c70b5d68b7 Windows: Always set the system timer resolution to 1ms by default.
An existing hint lets apps that don't need the timer resolution changed avoid
this, to save battery, etc, but this fixes several problems in timing, audio
callbacks not firing fast enough, etc.

Fixes Bugzilla #2944.
2015-04-20 12:22:44 -04:00
Philipp Wiesemann
114ee096de Fixed return value of SDL_SaveBMP_RW() depending on set errors after NULL input.
If SDL_SaveBMP_RW() was called with NULL passed as SDL_RWops argument, different
values were returned depending on SDL_GetError(). If no error was set before the
call (or SDL_ClearError() was called) then 0 was returned. This is wrong because
nothing was saved. If an error was set before the call then -1 was returned.

This was fixed by directly returning -1 for NULL input instead of deciding based
on SDL_GetError(). No new error is set because this would otherwise override a
maybe more useful error set in SDL_RWFromFile() which is used by SDL_SaveBMP().
2015-04-16 22:04:35 +02:00
Philipp Wiesemann
ae3eed46ff Linux: Removed not needed platform info from two entries of controller database.
Not needed because entries of this file are selected by conditional compilation.
2015-04-16 22:02:03 +02:00
Philipp Wiesemann
6fb400b336 Fixed typo in internal joystick documentation comments. 2015-04-15 21:29:55 +02:00
Philipp Wiesemann
b4d4deb27f Emscripten: Simplified implementation of joystick update function.
The function was implemented using four loops but only needed two.
2015-04-15 21:27:10 +02:00
Philipp Wiesemann
d4bf7188db Emscripten: Fixed memory leak if SDL_GetPrefPath() failed. 2015-04-15 21:25:15 +02:00
Philipp Wiesemann
6709176247 WinRT: Fixed format string for error message. 2015-04-13 20:52:18 +02:00
Ryan C. Gordon
935b5e9bdb Patched to compile on C89 compilers. 2015-04-12 21:02:21 -04:00
Ryan C. Gordon
23365ca7ec Make X11 and Wayland ProcessHitTest() code less verbose. 2015-04-12 20:59:48 -04:00
Ryan C. Gordon
d47525bd5e Implemented SetWindowHitTest() for Wayland (thanks, x414e54!).
Fixes Bugzilla #2941.
2015-04-12 20:40:06 -04:00
Alex Szpakowski
c02402a978 Fixed orientation issues in the iOS extended launch screen. 2015-04-12 01:50:28 -03:00
Alex Szpakowski
10b074d0d3 Fixed an iOS view orientation issue when SDL_GL_CreateContext or SDL_CreateRenderer is called. 2015-04-10 23:30:31 -03:00
Philipp Wiesemann
18c2c7afce Windows: Fixed format string for error message. 2015-04-11 20:43:11 +02:00
Philipp Wiesemann
62e57a47cf Mac: Fixed typo in two error messages. 2015-04-11 20:41:49 +02:00
Ryan C. Gordon
42b84aa9e1 Placate static analysis with an assertion. 2015-04-10 21:40:50 -04:00
Ryan C. Gordon
a37140004c Fixed memory leak in failure case that static analysis found. 2015-04-10 21:15:51 -04:00
Philipp Wiesemann
80aef1b842 PSP: Removed empty statement. 2015-04-10 23:45:13 +02:00