summaryrefslogtreecommitdiff
path: root/Source/3rdParty/SDL2/src/video/uikit/SDL_uikitappdelegate.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/3rdParty/SDL2/src/video/uikit/SDL_uikitappdelegate.m')
-rw-r--r--Source/3rdParty/SDL2/src/video/uikit/SDL_uikitappdelegate.m25
1 files changed, 1 insertions, 24 deletions
diff --git a/Source/3rdParty/SDL2/src/video/uikit/SDL_uikitappdelegate.m b/Source/3rdParty/SDL2/src/video/uikit/SDL_uikitappdelegate.m
index a942dfd..15762d2 100644
--- a/Source/3rdParty/SDL2/src/video/uikit/SDL_uikitappdelegate.m
+++ b/Source/3rdParty/SDL2/src/video/uikit/SDL_uikitappdelegate.m
@@ -445,30 +445,7 @@ SDL_LoadLaunchImageNamed(NSString *name, int screenh)
#if !TARGET_OS_TV
- (void)application:(UIApplication *)application didChangeStatusBarOrientation:(UIInterfaceOrientation)oldStatusBarOrientation
{
- BOOL isLandscape = UIInterfaceOrientationIsLandscape(application.statusBarOrientation);
- SDL_VideoDevice *_this = SDL_GetVideoDevice();
-
- if (_this && _this->num_displays > 0) {
- SDL_DisplayMode *desktopmode = &_this->displays[0].desktop_mode;
- SDL_DisplayMode *currentmode = &_this->displays[0].current_mode;
-
- /* The desktop display mode should be kept in sync with the screen
- * orientation so that updating a window's fullscreen state to
- * SDL_WINDOW_FULLSCREEN_DESKTOP keeps the window dimensions in the
- * correct orientation. */
- if (isLandscape != (desktopmode->w > desktopmode->h)) {
- int height = desktopmode->w;
- desktopmode->w = desktopmode->h;
- desktopmode->h = height;
- }
-
- /* Same deal with the current mode + SDL_GetCurrentDisplayMode. */
- if (isLandscape != (currentmode->w > currentmode->h)) {
- int height = currentmode->w;
- currentmode->w = currentmode->h;
- currentmode->h = height;
- }
- }
+ SDL_OnApplicationDidChangeStatusBarOrientation();
}
#endif