Commit c06f45e2 authored by Ryan C. Gordon's avatar Ryan C. Gordon

Another iOS 3.1 compatibility fix.

Thanks to Vittorio Giovara for the patch!
parent 6182eb37
...@@ -29,9 +29,8 @@ ...@@ -29,9 +29,8 @@
#include "../../events/SDL_events_c.h" #include "../../events/SDL_events_c.h"
#include "SDL_uikitwindow.h" #include "SDL_uikitwindow.h"
#include "SDL_uikitviewcontroller.h"
#import "SDL_uikitviewcontroller.h" #include "SDL_uikitvideo.h"
@implementation SDL_uikitviewcontroller @implementation SDL_uikitviewcontroller
...@@ -114,7 +113,11 @@ ...@@ -114,7 +113,11 @@
const UIInterfaceOrientation toInterfaceOrientation = [self interfaceOrientation]; const UIInterfaceOrientation toInterfaceOrientation = [self interfaceOrientation];
SDL_WindowData *data = self->window->driverdata; SDL_WindowData *data = self->window->driverdata;
UIWindow *uiwindow = data->uiwindow; 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)); const int noborder = (self->window->flags & (SDL_WINDOW_FULLSCREEN|SDL_WINDOW_BORDERLESS));
CGRect frame = noborder ? [uiscreen bounds] : [uiscreen applicationFrame]; CGRect frame = noborder ? [uiscreen bounds] : [uiscreen applicationFrame];
const CGSize size = frame.size; const CGSize size = frame.size;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment