Commit Graph

5479 Commits

Author SHA1 Message Date
Ryan C. Gordon
b4d54519bf Patched to compile on C89 compilers. 2015-05-27 19:00:56 -04:00
Ryan C. Gordon
cbed839222 Wayland: Avoid NULL dereference after window destruction (thanks, "x414e54"!).
Fixes Bugzilla #2934.
2015-05-27 18:54:06 -04:00
Sam Lantinga
fcc9350a83 Fixed detecting PS4 wired controller on Windows 2015-05-27 10:29:43 -07:00
Ryan C. Gordon
840f79e5ab Back out changeset 12d477422f47.
This change didn't do what I thought it did, sorry.
2015-05-26 22:57:42 -04:00
Ryan C. Gordon
da992de527 X11: generate clipboard update events (thanks, "chw"!).
Partially fixes Bugzilla #2266.
2015-05-26 21:29:45 -04:00
Ryan C. Gordon
1c4d384a54 Uh, yeah, it helps to press "Save" before committing... 2015-05-26 21:30:41 -04:00
Ryan C. Gordon
8de942f192 X11: use XA_STRING for text SDL puts on the clipboard (thanks, "chw"!).
Partially fixes Bugzilla #2266.
2015-05-26 21:26:27 -04:00
Ryan C. Gordon
906a4d69c1 Stack hint should look for 0, not -1, and not care about environment variables. 2015-05-26 21:19:23 -04:00
Ryan C. Gordon
bd539b9ed1 Added a hint to specify new thread stack size (thanks, Gabriel!).
Fixes Bugzilla #2019.

(we'll do a better fix when we break the API in SDL 2.1.)
2015-05-26 21:13:27 -04:00
Alex Baines
fa21b5b628 [IBus] Only register interest in messages sent to our input context. 2015-02-27 21:17:29 +00:00
Alex Baines
6609e24b9f [ibus] Send an empty TextEditing event when the text is cleared by pressing backspace. 2015-02-01 21:08:54 +00:00
Ryan C. Gordon
51794a6b76 Added some unknown keys from Japanese 106/109 keyboards (thanks, "ver0hiro"!).
This adds them for Windows and X11.

Fixes Bugzilla #2820.
2015-05-26 20:55:03 -04:00
Alex Szpakowski
cd4e3c5138 Mac: Send a window resize event when the window's backing scale factor changes.
The backing scale factor can change when the window moves between retina and non-retina displays.

The only other way to detect such a change is to compare the output of SDL_GL_GetDrawableSize or SDL_GetRendererOutputSize every frame, which is less than desirable, especially since the necessary app logic is likely already being executed when a window resize event is received.
2015-05-26 21:51:47 -03:00
Ryan C. Gordon
928aa99c9e Reset the keyboard state when launching a message box (thanks, Sean!).
Otherwise, pressed keys get stuck.

Fixes Bugzilla #2776.
2015-05-26 20:49:27 -04:00
Ryan C. Gordon
8e1c5b7196 Windows: Alt-F4 hotkey should be checked on keydown, not keyup (thanks, Matt!).
Fixes Bugzilla #2780.
2015-05-26 20:40:00 -04:00
Ryan C. Gordon
dcd8ca19be Android: Added basic drop file support (thanks, "noxalus"!).
This lets SDL-based apps respond to "Open With" commands properly, as they
can now obtain the requested path via a standard SDL dropfile event.

This is only checked on startup, so apps don't get drop events at any other
time, even if Android supports that, but this is still a definite
improvement.

Fixes Bugzilla #2762.
2015-05-26 20:36:45 -04:00
Alex Baines
a0af566518 Pump IBus events after X events. 2015-05-26 20:22:14 -04:00
Alex Szpakowski
ebc1abe743 EGL: OpenGL ES 3.0 contexts can now be created without the EGL_KHR_create_context extension.
Fixes bugzilla #2994.
2015-05-26 19:34:56 -03:00
Ryan C. Gordon
906c0a63ca Drop out of SDL_UpdateTexture() early if the rectangle is zero pixels.
Hopefully makes static analysis happy about a zero-byte malloc elsewhere.
2015-05-26 16:42:36 -04:00
Ryan C. Gordon
043f718e2f Some setups need _GNU_SOURCE to make LLONG_MAX available (thanks, Ozkan!).
Fixes Bugzilla #2721.
2015-05-26 16:31:11 -04:00
Ryan C. Gordon
4f20aa283f Whoops, fix the static analysis fix. 2015-05-26 16:14:25 -04:00
Ryan C. Gordon
97bf95b7fc Mac: Fix compiler warning when building with a min target >= 10.6. 2015-05-26 12:52:28 -04:00
Ryan C. Gordon
5bf1e0d78f Darwin haptic: Fixed a static analysis warning if axes==0. 2015-05-26 12:47:03 -04:00
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