Commit Graph

38 Commits

Author SHA1 Message Date
Philipp Wiesemann
266816b4aa Removed newlines from error messages. 2017-03-26 21:00:19 +02:00
Sam Lantinga
45b774e3f7 Updated copyright for 2017 2017-01-01 18:33:28 -08:00
Sam Lantinga
b4e069e7f8 Fixed bug 3517 - Compiler warnings with gcc -Wstrict-prototypes
felix

Compiling even a simple SDL2 'hello world' program with gcc -Wstrict-prototypes (GCC 6.2.1) results in warnings like:

/usr/include/SDL2/SDL_gamecontroller.h:143:1: attention : function declaration isn't a prototype [-Wstrict-prototypes]
 extern DECLSPEC int SDLCALL SDL_GameControllerNumMappings();
 ^~~~~~

It seems there is a missing 'void' between the parentheses.
2016-12-26 02:12:21 -08:00
Alex Szpakowski
eda74fda96 tvOS: Expose remote swipe gestures as arrow key presses (thanks oviano!) 2016-12-18 13:05:14 -04:00
Alex Szpakowski
787a54c84b iOS bug #3377: work around bugs in some third party iOS libraries (e.g. Google admob) where they assume the optional UIApplicationDelegate ?window? property always exists and will crash if it doesn?t. 2016-12-18 12:28:28 -04:00
Sam Lantinga
524bf3c282 Fixed bug 3513 - SDL_GL_SwapWindow does not return error status
Return an error code from SDL_GL_SwapWindow(), like the other SDL APIs.
2016-12-09 01:47:43 -08:00
Sam Lantinga
84c0780e25 Fixed bug 3305 - Fixed TextInput status when the keyboard was dismissed with the dismiss key on the iPad
Diego

I was previously unaware that rotating the device to a different orientation when the keyboard is shown causes a keyboardWillHide followed by a keyboardWillShow notification. The previous patch would then mistakenly StopTextInput when rotating. This patch fixes that by checking if the device is rotating before stopping text input.
2016-12-02 02:21:35 -08:00
Sam Lantinga
27d4f09929 Implemented SDL_GetHintBoolean() to make it easier to check boolean hints 2016-10-07 23:40:44 -07:00
Sam Lantinga
765d8bea01 Fixed bug 3305 - Fixed TextInput status when the keyboard was dismissed with the dismiss key on the iPad
Diego

The keyboard on iPads has a dismiss button that hides the keyboard. When the keyboard was hidden using that button, instead of the return key, SDL was still reporting IsTextInputActive as true. This patch adds an extra SDL_StopTextInput when iOS reports the keyboard will hide.
2016-10-01 12:46:36 -07:00
Alex Szpakowski
f31c7086d8 Enable SDL_LoadObject on iOS 8+ and tvOS. 2016-09-25 15:02:06 -03:00
Alex Szpakowski
77bacfd72d tvOS launch images are now properly supported. 2016-09-25 11:46:25 -03:00
Alex Szpakowski
40ecac8e60 Don't try to load a launch storyboard on tvOS (it doesn't use them). 2016-09-25 00:21:12 -03:00
Alex Szpakowski
666d3fecc8 iOS/tvOS: Try to load the launch screen as a storyboard. Xcode 8 compiles it as a storyboard instead of a nib. 2016-09-24 23:33:49 -03:00
Alex Szpakowski
9165ba7ebd iOS/tvOS: Always send SDL_WINDOWEVENT_FOCUS_GAINED when a window is created on the main screen (fixes bug #3395). 2016-09-24 20:12:57 -03:00
Alex Szpakowski
450fa8cdf9 Use OS-provided click counts on macOS and iOS for mouse press and release events. 2016-09-24 18:46:34 -03:00
Alex Szpakowski
4bcce330d1 tvOS: Add drop-file support 2016-09-15 21:49:29 -03:00
Alex Szpakowski
f050576665 Initial Apple TV / tvOS support.
The Apple TV remote is currently exposed as a joystick with its touch surface treated as two axes. Key presses are also generated when its buttons and touch surface are used.

A new hint has been added to help deal with deciding whether to background the app when the remote's menu button is pressed: SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS.
2016-09-13 22:18:06 -03:00
Sam Lantinga
1096f32309 Reverted previous commit which breaks game controller input processing. 2016-09-09 15:12:09 -07:00
Sam Lantinga
61c0f2cf64 Suggestion from Apple: use kCFRunLoopCommonModes which does more complete event processing 2016-09-08 20:38:23 -07:00
Alex Szpakowski
d0bd0e4855 iOS: Fix an OpenGL ES error when rotating the device if MSAA is used (thanks Cole Campbell!)
Fixes bug #3378.
2016-07-02 13:38:31 -03:00
Alex Szpakowski
34f095e098 iOS: Fixed SDL_GL_CreateContext crashing instead of returning null when a GLES3 context is requested on iOS 6 and older. 2016-04-10 22:07:10 -03:00
Alex Szpakowski
6cfa71a10e iOS: Also do the Dictation crash workaround before executing the animation callback. 2016-04-02 13:21:01 -03:00
Alex Szpakowski
5520ed9cc2 iOS: Workaround for a crash after Dictation is used. 2016-04-01 19:18:50 -03:00
Philipp Wiesemann
7da168db0a Fixed spaces in license comments. 2016-02-10 19:31:23 +01:00
Alex Szpakowski
8e7cd6b5da iOS: Implemented clipboard support. 2016-02-03 20:32:55 -04:00
Alex Szpakowski
87ea39be84 Removed dead code (caught by Clang's static analyzer). 2016-01-09 17:41:09 -04:00
Ryan C. Gordon
49e47688b4 Patched to compile on iOS. 2016-01-05 05:38:55 -05:00
Ryan C. Gordon
eeb899999f Patched to compile. 2016-01-05 05:22:35 -05:00
Ryan C. Gordon
c3114975db Added SDL_GetDisplayUsableBounds(). 2016-01-04 23:52:40 -05:00
Sam Lantinga
42065e785d Updated copyright to 2016 2016-01-02 10:10:34 -08:00
Alex Szpakowski
9c51c4a639 Mac: Detect the d-pad and pause buttons on Steelseries MFi gamepads (bug #3124.) 2015-11-12 22:44:32 -04:00
Alex Szpakowski
7267835842 iOS: Fixed crashes when rotating the screen after destroying a window. 2015-11-12 20:58:11 -04:00
Alex Szpakowski
ab2a350033 iOS: show message boxes using the new UIAlertController APIs when supported, rather than the deprecated UIAlertView.
UIAlertController is also supported on tvOS, whereas UIAlertView is not.
2015-09-25 15:17:20 -03:00
Alex Szpakowski
ecfdb10cfa iOS SDL_GL_CreateContext: Clamp the multisample sample count when the requested value is too high, rather than failing to create the context.
This matches the SDL_GL_CreateContext behavior in OS X.
2015-09-15 00:25:07 -03:00
Alex Szpakowski
82c8825cb5 iOS: Added support for force-touch on capable devices. 2015-09-09 19:08:52 -03:00
Alex Szpakowski
c344b734f4 iOS: Avoid generating an OpenGL error (but still fail to create the context) if the specified MSAA sample count is unsupported. 2015-07-19 19:56:16 -03:00
Alex Szpakowski
6ea942dae3 Added MSAA support for OpenGL ES contexts on iOS.
Note that extra steps must be taken when using glReadPixels to read the contents of the main OpenGL ES framebuffer on iOS, if multisampling is used. See the OpenGL ES section of README-ios.md for details.
2015-07-19 19:44:40 -03:00
Philipp Wiesemann
0e45984fa0 Fixed crash if initialization of EGL failed but was tried again later.
The internal function SDL_EGL_LoadLibrary() did not delete and remove a mostly
uninitialized data structure if loading the library first failed. A later try to
use EGL then skipped initialization and assumed it was previously successful
because the data structure now already existed. This led to at least one crash
in the internal function SDL_EGL_ChooseConfig() because a NULL pointer was
dereferenced to make a call to eglBindAPI().
2015-06-21 17:33:46 +02:00