Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Another iOS 3.1 compatibility fix.
Thanks to Vittorio Giovara for the patch!
  • Loading branch information
icculus committed Nov 28, 2011
1 parent 3309846 commit 91c47b1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/video/uikit/SDL_uikitviewcontroller.m
Expand Up @@ -29,9 +29,8 @@
#include "../../events/SDL_events_c.h"

#include "SDL_uikitwindow.h"

#import "SDL_uikitviewcontroller.h"

#include "SDL_uikitviewcontroller.h"
#include "SDL_uikitvideo.h"

@implementation SDL_uikitviewcontroller

Expand Down Expand Up @@ -114,7 +113,11 @@ - (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceO
const UIInterfaceOrientation toInterfaceOrientation = [self interfaceOrientation];
SDL_WindowData *data = self->window->driverdata;
UIWindow *uiwindow = data->uiwindow;
UIScreen *uiscreen = [uiwindow screen];
UIScreen *uiscreen;
if (SDL_UIKit_supports_multiple_displays)
uiscreen = [uiwindow screen];
else
uiscreen = [UIScreen mainScreen];
const int noborder = (self->window->flags & (SDL_WINDOW_FULLSCREEN|SDL_WINDOW_BORDERLESS));
CGRect frame = noborder ? [uiscreen bounds] : [uiscreen applicationFrame];
const CGSize size = frame.size;
Expand Down

0 comments on commit 91c47b1

Please sign in to comment.