author Alex Szpakowski <>
Thu, 15 Jan 2015 01:06:14 -0400
changeset 9532 318042c16b76
parent 8149 681eb46b8ac4
child 9619 b94b6d0bff0f
permissions -rw-r--r--
Several improvements to the iOS backend:

- Added new custom launch screen code. It uses the launch screen nib when available on iOS 8+, the launch images dictionary if the launch screen nib isn't available, and the old standard image names if the launch image dictionary isn't in the plist.
The launch screen is now hidden during the first call to SDL_PumpEvents rather than SDL_CreateWindow so apps can have the launch screen still visible if they do time-consuming loading after creating their window. It also fades out in roughly the same way as the system launch screen behavior.
It can be disabled by setting the SDL_IPHONE_LAUNCHSCREEN define in SDL_config_iphoneos.h to 0.

- A blank UIView is now created and displayed when the window is first created. The old behavior was to defer creating any view until SDL_GL_CreateContext, which prevented rotation, touch events, and other windowing-related things from working until then. This also makes it easier to use SDL_GetWindowWMInfo after creating a window.

- Moved the keyboard and animation callback code from SDL's UIView subclasses to its UIViewController subclass, which lets them work properly in all cases when a SDL window is valid, even before SDL_GL_CreateContext is called and after SDL_GL_DeleteContext is called.

- SDL_GL_CreateContext, SDL_GL_SwapWindow, SDL_GL_MakeCurrent, and SDL_GL_DeleteContext are more robust.

- Fixed some edge cases where SDL windows weren't rotating properly or their reported sizes were out of sync with their actual sizes.

- Removed all calls to [UIApplication setStatusBarOrientation:]. It doesn't seem to work as expected in all cases in recent iOS versions.

- Some code style cleanup.
     2 Simple DirectMedia Layer
     3 Copyright (C) 1997-2014 Sam Lantinga <>
     5 This software is provided 'as-is', without any express or implied
     6 warranty.  In no event will the authors be held liable for any damages
     7 arising from the use of this software.
     9 Permission is granted to anyone to use this software for any purpose,
    10 including commercial applications, and to alter it and redistribute it
    11 freely, subject to the following restrictions:
    13 1. The origin of this software must not be misrepresented; you must not
    14    claim that you wrote the original software. If you use this software
    15    in a product, an acknowledgment in the product documentation would be
    16    appreciated but is not required. 
    17 2. Altered source versions must be plainly marked as such, and must not be
    18    misrepresented as being the original software.
    19 3. This notice may not be removed or altered from any source distribution.