Commit Graph

15 Commits

Author SHA1 Message Date
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
Philipp Wiesemann
f662f68066 iOS: Updated demo README. 2016-10-09 20:30:49 +02:00
Philipp Wiesemann
c2cb0b0ff4 iOS: Removed unused constant in demo. 2016-09-30 23:31:24 +02:00
Philipp Wiesemann
357c3dd746 iOS: Updated comment in demo. 2016-09-26 23:09:19 +02:00
Alex Szpakowski
a8b033d7c4 Update the code for the iOS demos to handle modern devices. Fixes bug #3337 2016-09-25 00:23:35 -03:00
Alex Szpakowski
4209a1fd4c CoreAudio iOS/tvOS: Use AVFoundation instead of AudioSession. Fixes audio on tvOS.
Note that linking with AVFoundation is now required if you don't disable SDL_audio compilation on iOS and tvOS.
2016-09-15 19:59:57 -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
Philipp Wiesemann
f3ca4e4d50 iOS: Fixed compiling demos on C89 compilers. 2016-04-01 21:14:49 +02:00
Philipp Wiesemann
62ebc527d0 iOS: Removed not needed SDL_WINDOW_SHOWN from rectangles demo. 2016-03-28 21:01:46 +02:00
Philipp Wiesemann
bd60850b82 iOS: Fixed keyboard demo ignoring quit requests and window closing.
This also fixed a warning about an unused variable.
2016-03-28 21:01:26 +02:00
Philipp Wiesemann
e9ca5b28a6 iOS: Replaced #import with #include in two demos.
This extension to C is not required here and made the demos less portable.
2016-03-27 22:26:34 +02:00
Philipp Wiesemann
5fa0cbc4ba iOS: Restored older version of rectangles demo.
The demo did not draw rectangles like described in the demo README.
2016-03-27 22:25:13 +02:00
Philipp Wiesemann
16c479f332 iOS: Updated SDL version in demo README. 2016-03-27 22:24:10 +02:00
Alex Szpakowski
2bf6f1bcb7 Added initial support for MFi game controllers on iOS. 2015-09-20 23:08:36 -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