Another iOS 3.1 compatibility fix.
Thanks to Vittorio Giovara for the patch!
This commit is contained in:
parent
6182eb372a
commit
c06f45e2ba
1 changed files with 7 additions and 4 deletions
|
@ -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 @@
|
||||||
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;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue