Please sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing with 980 additions and 732 deletions.
- +3 −0 include/SDL_config_iphoneos.h
- +3 −0 premake/Xcode-iOS/SDL_config_premake.h
- +14 −11 src/video/SDL_video.c
- +13 −3 src/video/uikit/SDL_uikitappdelegate.h
- +236 −25 src/video/uikit/SDL_uikitappdelegate.m
- +11 −27 src/video/uikit/SDL_uikitmessagebox.m
- +10 −8 src/video/uikit/SDL_uikitmodes.m
- +65 −93 src/video/uikit/SDL_uikitopengles.m
- +26 −31 src/video/uikit/SDL_uikitopenglview.h
- +40 −79 src/video/uikit/SDL_uikitopenglview.m
- +4 −28 src/video/uikit/SDL_uikitview.h
- +72 −302 src/video/uikit/SDL_uikitview.m
- +41 −1 src/video/uikit/SDL_uikitviewcontroller.h
- +333 −6 src/video/uikit/SDL_uikitviewcontroller.m
- +4 −2 src/video/uikit/SDL_uikitwindow.h
- +105 −116 src/video/uikit/SDL_uikitwindow.m
Oops, something went wrong.