Commit Graph

105 Commits

Author SHA1 Message Date
Sam Lantinga
9f5ee51953 Moved deployment target values to project settings 2017-12-12 22:30:21 -08:00
Sam Lantinga
c08bbbd902 Parameterized the All (target platform) build target scripts so they can be used in other projects 2017-12-12 21:59:39 -08:00
Sam Lantinga
da1568c35c Renamed Xcode build targets so it's easier to copy files out of build directories on the command line
Also enabled bitcode, which is needed for App Store builds
2017-12-12 12:14:55 -08:00
Sam Lantinga
d24717a636 Added SDL_uikitmetalview.m to the tvOS project 2017-12-12 11:29:00 -08:00
Sam Lantinga
37f351acfe Added the Metal framework to several iOS tests 2017-12-10 09:09:27 -08:00
Sam Lantinga
31404706b5 Fixed building for simulators or older iOS SDKs 2017-12-07 17:47:01 -08:00
Sam Lantinga
c6972eecc2 Fixed compiling Metal renderer on iOS 2017-12-07 17:12:03 -08:00
Sam Lantinga
44087f9b2f Updated SDL's YUV support, many thanks to Adrien Descamps
New functions get and set the YUV colorspace conversion mode:
	SDL_SetYUVConversionMode()
	SDL_GetYUVConversionMode()
	SDL_GetYUVConversionModeForResolution()

SDL_ConvertPixels() converts between all supported RGB and YUV formats, with SSE acceleration for converting from planar YUV formats (YV12, NV12, etc) to common RGB/RGBA formats.

Added a new test program, testyuv, to verify correctness and speed of YUV conversion functionality.
2017-11-12 22:51:12 -08:00
Sam Lantinga
b9c87556fb Updated SDL iOS project for tvOS 2017-10-26 10:49:33 -07:00
Sam Lantinga
eea9c57d52 Added functions to query and set the SDL memory allocation functions:
SDL_GetMemoryFunctions()
    SDL_SetMemoryFunctions()
    SDL_GetNumAllocations()
2017-10-12 13:44:28 -07:00
Sam Lantinga
8c4fe054b3 Added stubs for simple Steam Controller support 2017-09-22 08:30:52 -07:00
Sam Lantinga
8667ba6160 Fixed bug 3837 - Change project settings for Xcode 9?
Mark Callow

Xcode 9 emits a warning to validate project settings. The changes it proposes are

1. [iOS] Update the iOS deployment target to 8.0 since Xcode does
   not support anything older.

2. [macOS] Target 'Framework' - Automatically Select Archectures.

3. [iOS & macOS] Turns on a bunch more compile warnings, a *lot* more on iOS.

4. [iOS & macOS] Turn on "Missing Localizability".

I want to confirm if it is ok to accept these changes and submit updated project files.

Since Alex Szpakowski has just removed iOS 7 guard ifdef's, I'm guessing 1 isn't a problem.

2 is probably ok for anyone building themselves. I wonder if it may cause problems for building distribution binaries.

3 shouldn't be a problem either provided any newly emitted warnings are fixed.

4 I am unfamiliar with. The description says "This will turn on the static analyzer to check for "Missing Localizability", because this project is localized for multiple languages." I suppose this may cause new warnings.
2017-09-22 12:26:54 -07:00
Sam Lantinga
2cd74f864b The volume was too high, clamp to SDL_MIX_MAXVOLUME 2017-09-22 11:15:57 -07:00
Sam Lantinga
e71f36a81a Updated iOS keyboard test to cover text input rect and orientation changes 2017-09-14 09:56:16 -07:00
Ryan C. Gordon
10d552ae31 vulkan: Initial Vulkan support!
This work was done by Jacob Lifshay and Mark Callow; I'm just merging it
into revision control.
2017-08-27 22:15:57 -04:00
Alex Szpakowski
3a3d67f862 More cleanup of the iOS keyboard demo. 2017-08-15 23:00:54 -03:00
Alex Szpakowski
86ed4c9ebb Improve iOS keyboard demo code a bit. 2017-08-15 22:53:57 -03:00
Philipp Wiesemann
2c66e2590c ios: Fixed math include in demos. 2017-05-25 23:01:59 +02:00
Philipp Wiesemann
84b25e4696 ios: Fixed compiler warnings about unused variables in demo. 2017-04-09 23:00:26 +02:00
Philipp Wiesemann
b59c0eabed iOS: Fixed compiling template on C89 compilers. 2017-03-19 22:17:01 +01:00
Sam Lantinga
7f0b81eebd 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
Ryan C. Gordon
de74e41109 xcode: Make sure SDL_dataqueue sources are included in all targets. 2016-12-06 13:33:02 -05:00
Ryan C. Gordon
1ddf1e6935 xcode: updated macOS and iOS project files with SDL_dataqueue sources. 2016-12-06 12:30:31 -05:00
Philipp Wiesemann
1be57de908 iOS: Updated demo README. 2016-10-09 20:30:49 +02:00
Philipp Wiesemann
38b6a1dd7f iOS: Removed unused constant in demo. 2016-09-30 23:31:24 +02:00
Philipp Wiesemann
0ae687190d iOS: Updated comment in demo. 2016-09-26 23:09:19 +02:00
Alex Szpakowski
1a54c6f5f6 Update the code for the iOS demos to handle modern devices. Fixes bug #3337 2016-09-25 00:23:35 -03:00
Alex Szpakowski
c4da538ddb 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
Sam Lantinga
b828bd1058 Fixed building for both iOS and tvOS on Xcode 8 2016-09-14 08:45:35 -07:00
Sam Lantinga
dff28c0f37 Allow targeting tvOS 2016-09-14 07:09:35 -07:00
Alex Szpakowski
a714cf6d15 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
Alex Szpakowski
f7cdca5b0d Enable more compiler warnings in the Xcode projects (based on Xcode 8's suggestion), made some integer downcasts explicit. 2016-09-13 19:51:10 -03:00
Ryan C. Gordon
6b1488f2a5 audio: Removed internal SDL_audiomem.h and macros.
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.
2016-08-05 01:44:15 -04:00
Philipp Wiesemann
8a432359da iOS: Fixed compiling demos on C89 compilers. 2016-04-01 21:14:49 +02:00
Philipp Wiesemann
0a5e546dfb iOS: Removed not needed SDL_WINDOW_SHOWN from rectangles demo. 2016-03-28 21:01:46 +02:00
Philipp Wiesemann
41cd6d9008 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
0efc62adae 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
0ac0ab753e 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
be485f3258 iOS: Updated SDL version in demo README. 2016-03-27 22:24:10 +02:00
Alex Szpakowski
1ff3dd4faa iOS: Implemented clipboard support. 2016-02-03 20:32:55 -04:00
Philipp Wiesemann
327027d07d Fixed outdated information in a README for iOS.
Four of the listed programs do not exist anymore.
2016-01-06 22:39:04 +01:00
Alex Szpakowski
4a556c4c01 Added initial support for MFi game controllers on iOS. 2015-09-20 23:08:36 -03:00
Sam Lantinga
bdf070eeb3 Fixed building test programs on the iOS simulator 2015-05-28 18:57:57 -07:00
Alex Szpakowski
d62057a321 Fixed building the iOS Demo files in debug mode 2015-05-06 12:42:14 -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
Alex Szpakowski
dc1539ad24 Switched to the core versions of OpenGL ES framebuffer object and renderbuffer functions.
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
2014-10-28 01:34:40 -03:00
Alex Szpakowski
19f09c82c3 Updated the iOS backend code to use Objective-C's automatic reference counting (ARC).
--HG--
branch : iOS-improvements
2014-08-06 03:24:16 -03:00
Sam Lantinga
fe039073ba Fixed bug 2626 - iOS: fix test and template Xcode projects and build scripts to link with CoreMotion
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.
2014-07-07 10:42:19 -07:00
Sam Lantinga
98704e96c1 Updated the template project for iOS, thanks to Davide Coppola 2014-06-25 21:40:56 -07:00
Sam Lantinga
5a816a6c2c Fixed bug 2603 - iOS: update joystick accelerometer code to use CoreMotion instead of the deprecated UIAccelerometer
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.
2014-06-25 00:20:21 -07:00