This work was done by Jacob Lifshay and Mark Callow; I'm just merging it
into revision control.
--HG--
extra : rebase_source : cb3bb332146125366b5242c0d7444f44638733d9
extra : amend_source : c72ebb6d3a92efc3fdd085ce3b6d4b1d7f573cc9
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.
Note that linking with AVFoundation is now required if you don't disable SDL_audio compilation on iOS and tvOS.
--HG--
rename : src/audio/coreaudio/SDL_coreaudio.c => src/audio/coreaudio/SDL_coreaudio.m
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.
I think this was important for SDL 1.2 because some targets needed
special device memory for DMA buffers or locked memory buffers for use in
hardware interrupts or something, but since it just defines to SDL_malloc
and SDL_free now, I took it out for clarity's sake.
--HG--
extra : histedit_source : 57b48e44e65de9ce4e16604167db325df05bdf98%2C31d881e4d1b5eeba771f04bb43be0d23c3e605ce
Both the extension (OES) and the core versions work, but the core versions are more correct for GLES2+ and they're less verbose.
--HG--
branch : iOS-improvements
Alex Szpakowski
Now that SDL on iOS requires CoreMotion to be linked, some of the Xcode projects included with the SDL source (such as the iOS tests and the iOS app template) as well as the premake and automake scripts need to be updated.
I've attached a patch which does so. It also fixes the SDL Xcode project to build for 64-bit ARM as well as armv7 by default (or whatever the default ARM targets are for the Xcode version used), which is what the iOS app template expects.
Alex Szpakowski
SDL's code for exposing the accelerometer as a joystick on iOS currently uses UIAccelerometer, which was superseded by the CoreMotion framework and deprecated since iOS 5.
The UIAccelerometer code still works (for now), but it also throws deprecation warnings whenever SDL is built for iOS, since SDL's deployment target is no longer below iOS 5.
I've created a patch which replaces the old UIAccelerometer code with a replacement based on the CoreMotion framework. It has identical functionality (to SDL users), however iOS apps are now required to link to the CoreMotion framework when using SDL.