project_files/HedgewarsMobile/SDL-50560ca58f80.patch
changeset 6337 84e7d1a5e3df
parent 6259 02765411a912
equal deleted inserted replaced
6335:f753b290d966 6337:84e7d1a5e3df
     1 diff -r 50560ca58f80 Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj
     1 diff -r 9738f2a8eee4 Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj
     2 --- a/Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj	Mon Oct 24 23:18:53 2011 -0400
     2 --- a/Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj	Wed Nov 09 02:35:49 2011 -0500
     3 +++ b/Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj	Wed Nov 02 09:22:08 2011 +0100
     3 +++ b/Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj	Sat Nov 12 21:55:27 2011 +0100
     4 @@ -1596,9 +1596,12 @@
     4 @@ -1596,9 +1596,12 @@
     5  				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
     5  				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
     6  				GCC_C_LANGUAGE_STANDARD = c99;
     6  				GCC_C_LANGUAGE_STANDARD = c99;
     7  				GCC_DEBUGGING_SYMBOLS = full;
     7  				GCC_DEBUGGING_SYMBOLS = full;
     8 +				GCC_OPTIMIZATION_LEVEL = 0;
     8 +				GCC_OPTIMIZATION_LEVEL = 0;
    27 -				IPHONEOS_DEPLOYMENT_TARGET = 3.1.3;
    27 -				IPHONEOS_DEPLOYMENT_TARGET = 3.1.3;
    28 +				IPHONEOS_DEPLOYMENT_TARGET = 3.0;
    28 +				IPHONEOS_DEPLOYMENT_TARGET = 3.0;
    29  				PREBINDING = NO;
    29  				PREBINDING = NO;
    30  				SDKROOT = iphoneos;
    30  				SDKROOT = iphoneos;
    31  				TARGETED_DEVICE_FAMILY = "1,2";
    31  				TARGETED_DEVICE_FAMILY = "1,2";
    32 diff -r 50560ca58f80 include/SDL_config_iphoneos.h
    32 @@ -1630,6 +1636,7 @@
    33 --- a/include/SDL_config_iphoneos.h	Mon Oct 24 23:18:53 2011 -0400
    33  				DEPLOYMENT_LOCATION = NO;
    34 +++ b/include/SDL_config_iphoneos.h	Wed Nov 02 09:22:08 2011 +0100
    34  				GCC_DYNAMIC_NO_PIC = NO;
       
    35  				GCC_OPTIMIZATION_LEVEL = 0;
       
    36 +				GCC_PREPROCESSOR_DEFINITIONS = SDL_NO_COMPAT;
       
    37  				PREBINDING = NO;
       
    38  				PRODUCT_NAME = SDL;
       
    39  				SKIP_INSTALL = YES;
       
    40 @@ -1644,6 +1651,7 @@
       
    41  				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
       
    42  				DEPLOYMENT_LOCATION = NO;
       
    43  				GCC_ENABLE_FIX_AND_CONTINUE = NO;
       
    44 +				GCC_PREPROCESSOR_DEFINITIONS = SDL_NO_COMPAT;
       
    45  				PREBINDING = NO;
       
    46  				PRODUCT_NAME = SDL;
       
    47  				SKIP_INSTALL = YES;
       
    48 diff -r 9738f2a8eee4 include/SDL_compat.h
       
    49 --- a/include/SDL_compat.h	Wed Nov 09 02:35:49 2011 -0500
       
    50 +++ b/include/SDL_compat.h	Sat Nov 12 21:55:27 2011 +0100
       
    51 @@ -40,7 +40,7 @@
       
    52  
       
    53   /*@}*/
       
    54  
       
    55 -#ifdef SDL_NO_COMPAT
       
    56 +#ifndef SDL_NO_COMPAT
       
    57  #define _SDL_compat_h
       
    58  #endif
       
    59  
       
    60 diff -r 9738f2a8eee4 include/SDL_config_iphoneos.h
       
    61 --- a/include/SDL_config_iphoneos.h	Wed Nov 09 02:35:49 2011 -0500
       
    62 +++ b/include/SDL_config_iphoneos.h	Sat Nov 12 21:55:27 2011 +0100
    35 @@ -106,7 +106,7 @@
    63 @@ -106,7 +106,7 @@
    36  /* enable iPhone version of Core Audio driver */
    64  /* enable iPhone version of Core Audio driver */
    37  #define SDL_AUDIO_DRIVER_COREAUDIO 1
    65  #define SDL_AUDIO_DRIVER_COREAUDIO 1
    38  /* Enable the dummy audio driver (src/audio/dummy/\*.c) */
    66  /* Enable the dummy audio driver (src/audio/dummy/\*.c) */
    39 -#define SDL_AUDIO_DRIVER_DUMMY	1
    67 -#define SDL_AUDIO_DRIVER_DUMMY	1
    59 -#define SDL_JOYSTICK_DISABLED 0
    87 -#define SDL_JOYSTICK_DISABLED 0
    60 +#define SDL_JOYSTICK_DISABLED 1
    88 +#define SDL_JOYSTICK_DISABLED 1
    61  
    89  
    62  /* Set max recognized G-force from accelerometer
    90  /* Set max recognized G-force from accelerometer
    63     See src/joystick/uikit/SDLUIAccelerationDelegate.m for notes on why this is needed
    91     See src/joystick/uikit/SDLUIAccelerationDelegate.m for notes on why this is needed
    64 diff -r 50560ca58f80 src/video/uikit/SDL_uikitopenglview.m
    92 diff -r 9738f2a8eee4 include/SDL_events.h
    65 --- a/src/video/uikit/SDL_uikitopenglview.m	Mon Oct 24 23:18:53 2011 -0400
    93 --- a/include/SDL_events.h	Wed Nov 09 02:35:49 2011 -0500
    66 +++ b/src/video/uikit/SDL_uikitopenglview.m	Wed Nov 02 09:22:08 2011 +0100
    94 +++ b/include/SDL_events.h	Sat Nov 12 21:55:27 2011 +0100
    67 @@ -114,8 +114,8 @@
    95 @@ -107,11 +107,12 @@
       
    96  
       
    97      SDL_CLIPBOARDUPDATE = 0x900, /**< The clipboard changed */
       
    98  
       
    99 +#ifndef SDL_NO_COMPAT
       
   100      /* Obsolete events */
       
   101      SDL_EVENT_COMPAT1 = 0x7000, /**< SDL 1.2 events for compatibility */
       
   102      SDL_EVENT_COMPAT2,
       
   103      SDL_EVENT_COMPAT3,
       
   104 -
       
   105 +#endif
       
   106  
       
   107      /** Events ::SDL_USEREVENT through ::SDL_LASTEVENT are for your use,
       
   108       *  and should be allocated with SDL_RegisterEvents()
       
   109 diff -r 9738f2a8eee4 src/SDL_compat.c
       
   110 --- a/src/SDL_compat.c	Wed Nov 09 02:35:49 2011 -0500
       
   111 +++ b/src/SDL_compat.c	Sat Nov 12 21:55:27 2011 +0100
       
   112 @@ -29,6 +29,7 @@
       
   113  #include "video/SDL_pixels_c.h"
       
   114  #include "render/SDL_yuv_sw_c.h"
       
   115  
       
   116 +#ifndef SDL_NO_COMPAT
       
   117  
       
   118  static SDL_Window *SDL_VideoWindow = NULL;
       
   119  static SDL_Surface *SDL_WindowSurface = NULL;
       
   120 @@ -1813,4 +1814,5 @@
       
   121      return 0;
       
   122  }
       
   123  
       
   124 +#endif /* SDL_NO_COMPAT */
       
   125  /* vi: set ts=4 sw=4 expandtab: */
       
   126 diff -r 9738f2a8eee4 src/video/SDL_surface.c
       
   127 --- a/src/video/SDL_surface.c	Wed Nov 09 02:35:49 2011 -0500
       
   128 +++ b/src/video/SDL_surface.c	Sat Nov 12 21:55:27 2011 +0100
       
   129 @@ -195,12 +195,14 @@
       
   130          SDL_InvalidateMap(surface->map);
       
   131      }
       
   132  
       
   133 +#ifndef SDL_NO_COMPAT
       
   134      /* Compatibility mode */
       
   135      if (surface->map->info.flags & SDL_COPY_COLORKEY) {
       
   136          surface->flags |= SDL_SRCCOLORKEY;
       
   137      } else {
       
   138          surface->flags &= ~SDL_SRCCOLORKEY;
       
   139      }
       
   140 +#endif
       
   141  
       
   142      return 0;
       
   143  }
       
   144 @@ -405,12 +407,14 @@
       
   145          SDL_InvalidateMap(surface->map);
       
   146      }
       
   147  
       
   148 +#ifndef SDL_NO_COMPAT
       
   149      /* Compatibility mode */
       
   150      if (surface->map->info.flags & SDL_COPY_BLEND) {
       
   151          surface->flags |= SDL_SRCALPHA;
       
   152      } else {
       
   153          surface->flags &= ~SDL_SRCALPHA;
       
   154      }
       
   155 +#endif
       
   156  
       
   157      return status;
       
   158  }
       
   159 diff -r 9738f2a8eee4 src/video/uikit/SDL_uikitappdelegate.h
       
   160 --- a/src/video/uikit/SDL_uikitappdelegate.h	Wed Nov 09 02:35:49 2011 -0500
       
   161 +++ b/src/video/uikit/SDL_uikitappdelegate.h	Sat Nov 12 21:55:27 2011 +0100
       
   162 @@ -24,7 +24,7 @@
       
   163  @interface SDLUIKitDelegate : NSObject<UIApplicationDelegate> {
       
   164  }
       
   165  
       
   166 -+ (SDLUIKitDelegate *)sharedAppDelegate;
       
   167 ++ (id) sharedAppDelegate;
       
   168  + (NSString *)getAppDelegateClassName;
       
   169  
       
   170  @end
       
   171 diff -r 9738f2a8eee4 src/video/uikit/SDL_uikitappdelegate.m
       
   172 --- a/src/video/uikit/SDL_uikitappdelegate.m	Wed Nov 09 02:35:49 2011 -0500
       
   173 +++ b/src/video/uikit/SDL_uikitappdelegate.m	Sat Nov 12 21:55:27 2011 +0100
       
   174 @@ -79,10 +79,10 @@
       
   175  @implementation SDLUIKitDelegate
       
   176  
       
   177  /* convenience method */
       
   178 -+ (SDLUIKitDelegate *)sharedAppDelegate
       
   179 ++ (id) sharedAppDelegate
       
   180  {
       
   181      /* the delegate is set in UIApplicationMain(), which is garaunteed to be called before this method */
       
   182 -    return (SDLUIKitDelegate *)[[UIApplication sharedApplication] delegate];
       
   183 +    return [[UIApplication sharedApplication] delegate];
       
   184  }
       
   185  
       
   186  + (NSString *)getAppDelegateClassName
       
   187 diff -r 9738f2a8eee4 src/video/uikit/SDL_uikitopengles.m
       
   188 --- a/src/video/uikit/SDL_uikitopengles.m	Wed Nov 09 02:35:49 2011 -0500
       
   189 +++ b/src/video/uikit/SDL_uikitopengles.m	Sat Nov 12 21:55:27 2011 +0100
       
   190 @@ -79,7 +79,7 @@
       
   191  
       
   192  void UIKit_GL_SwapWindow(_THIS, SDL_Window * window)
       
   193  {
       
   194 -#ifdef SDL_POWER_UIKIT
       
   195 +#if SDL_POWER_UIKIT
       
   196      // Check once a frame to see if we should turn off the battery monitor.
       
   197      SDL_UIKit_UpdateBatteryMonitoring();
       
   198  #endif
       
   199 diff -r 9738f2a8eee4 src/video/uikit/SDL_uikitopenglview.m
       
   200 --- a/src/video/uikit/SDL_uikitopenglview.m	Wed Nov 09 02:35:49 2011 -0500
       
   201 +++ b/src/video/uikit/SDL_uikitopenglview.m	Sat Nov 12 21:55:27 2011 +0100
       
   202 @@ -117,8 +117,8 @@
    68  
   203  
    69          // !!! FIXME: use the screen this is on!
   204          // !!! FIXME: use the screen this is on!
    70          /* Use the main screen scale (for retina display support) */
   205          /* Use the main screen scale (for retina display support) */
    71 -        if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)])
   206 -        if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)])
    72 -            self.contentScaleFactor = [UIScreen mainScreen].scale;
   207 -            self.contentScaleFactor = [UIScreen mainScreen].scale;
    73 +        if ([self respondsToSelector:@selector(contentScaleFactor)])
   208 +        if ([self respondsToSelector:@selector(contentScaleFactor)])
    74 +            self.contentScaleFactor = [[UIScreen mainScreen] scale];
   209 +            self.contentScaleFactor = [[UIScreen mainScreen] scale];
    75  
   210  
    76          self.autoresizingMask = 0;  // don't allow autoresize, since we need to do some magic in -(void)updateFrame.
   211          self.autoresizingMask = 0;  // don't allow autoresize, since we need to do some magic in -(void)updateFrame.
    77      }
   212      }
    78 @@ -144,8 +144,8 @@
   213 @@ -147,8 +147,8 @@
    79  
   214  
    80      // !!! FIXME: use the screen this is on!
   215      // !!! FIXME: use the screen this is on!
    81      /* Use the main screen scale (for retina display support) */
   216      /* Use the main screen scale (for retina display support) */
    82 -    if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)])
   217 -    if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)])
    83 -        self.contentScaleFactor = [UIScreen mainScreen].scale;
   218 -        self.contentScaleFactor = [UIScreen mainScreen].scale;
    84 +    if ([self respondsToSelector:@selector(contentScaleFactor)])
   219 +    if ([self respondsToSelector:@selector(contentScaleFactor)])
    85 +        self.contentScaleFactor = [[UIScreen mainScreen] scale];
   220 +        self.contentScaleFactor = [[UIScreen mainScreen] scale];
    86  }
   221  }
    87  
   222  
    88  - (void)setCurrentContext
   223  - (void)setCurrentContext
    89 diff -r 50560ca58f80 src/video/uikit/SDL_uikitvideo.m
   224 diff -r 9738f2a8eee4 src/video/uikit/SDL_uikitvideo.m
    90 --- a/src/video/uikit/SDL_uikitvideo.m	Mon Oct 24 23:18:53 2011 -0400
   225 --- a/src/video/uikit/SDL_uikitvideo.m	Wed Nov 09 02:35:49 2011 -0500
    91 +++ b/src/video/uikit/SDL_uikitvideo.m	Wed Nov 02 09:22:08 2011 +0100
   226 +++ b/src/video/uikit/SDL_uikitvideo.m	Sat Nov 12 21:55:27 2011 +0100
    92 @@ -178,7 +178,7 @@
   227 @@ -201,10 +201,8 @@
    93  
       
    94      // UIScreenMode showed up in 3.2 (the iPad and later). We're
       
    95      //  misusing this supports_multiple_displays flag here for that.
       
    96 -    if (!SDL_UIKit_supports_multiple_displays) {
       
    97 +    if (SDL_UIKit_supports_multiple_displays) {
       
    98          UIScreenMode *uimode = [uiscreen currentMode];
       
    99          [uimode retain];  // once for the desktop_mode
       
   100          [uimode retain];  // once for the current_mode
       
   101 @@ -200,10 +200,8 @@
       
   102  {
   228  {
   103      _this->gl_config.driver_loaded = 1;
   229      _this->gl_config.driver_loaded = 1;
   104  
   230  
   105 -    NSString *reqSysVer = @"3.2";
   231 -    NSString *reqSysVer = @"3.2";
   106 -    NSString *currSysVer = [[UIDevice currentDevice] systemVersion];
   232 -    NSString *currSysVer = [[UIDevice currentDevice] systemVersion];
   109 +    // this tells us whether we are running on ios >= 3.2
   235 +    // this tells us whether we are running on ios >= 3.2
   110 +    SDL_UIKit_supports_multiple_displays = [UIScreen instancesRespondToSelector:@selector(currentMode)];
   236 +    SDL_UIKit_supports_multiple_displays = [UIScreen instancesRespondToSelector:@selector(currentMode)];
   111  
   237  
   112      // Add the main screen.
   238      // Add the main screen.
   113      UIScreen *uiscreen = [UIScreen mainScreen];
   239      UIScreen *uiscreen = [UIScreen mainScreen];
   114 diff -r 50560ca58f80 src/video/uikit/SDL_uikitview.m
   240 diff -r 9738f2a8eee4 src/video/uikit/SDL_uikitview.m
   115 --- a/src/video/uikit/SDL_uikitview.m	Mon Oct 24 23:18:53 2011 -0400
   241 --- a/src/video/uikit/SDL_uikitview.m	Wed Nov 09 02:35:49 2011 -0500
   116 +++ b/src/video/uikit/SDL_uikitview.m	Wed Nov 02 09:22:08 2011 +0100
   242 +++ b/src/video/uikit/SDL_uikitview.m	Sat Nov 12 21:55:27 2011 +0100
   117 @@ -311,7 +311,7 @@
   243 @@ -316,7 +316,7 @@
   118  /* iPhone keyboard addition functions */
   244  /* iPhone keyboard addition functions */
   119  #if SDL_IPHONE_KEYBOARD
   245  #if SDL_IPHONE_KEYBOARD
   120  
   246  
   121 -SDL_uikitview * getWindowView(SDL_Window * window)
   247 -static SDL_uikitview * getWindowView(SDL_Window * window)
   122 +SDL_uikitview *SDL_getUikitView(SDL_Window *window)
   248 +SDL_uikitview *SDL_getUikitView(SDL_Window *window)
   123  {
   249  {
   124      if (window == NULL) {
   250      if (window == NULL) {
   125          SDL_SetError("Window does not exist");
   251          SDL_SetError("Window does not exist");
   126 @@ -328,9 +328,9 @@
   252 @@ -333,9 +333,9 @@
   127      return view;
   253      return view;
   128  }
   254  }
   129  
   255  
   130 -int SDL_iPhoneKeyboardShow(SDL_Window * window)
   256 -int SDL_iPhoneKeyboardShow(SDL_Window * window)
   131 +int SDL_iPhoneKeyboardShow(SDL_Window *window)
   257 +int SDL_iPhoneKeyboardShow(SDL_Window *window)
   133 -    SDL_uikitview *view = getWindowView(window);
   259 -    SDL_uikitview *view = getWindowView(window);
   134 +    SDL_uikitview *view = SDL_getUikitView(window);
   260 +    SDL_uikitview *view = SDL_getUikitView(window);
   135      if (view == nil) {
   261      if (view == nil) {
   136          return -1;
   262          return -1;
   137      }
   263      }
   138 @@ -339,9 +339,9 @@
   264 @@ -344,9 +344,9 @@
   139      return 0;
   265      return 0;
   140  }
   266  }
   141  
   267  
   142 -int SDL_iPhoneKeyboardHide(SDL_Window * window)
   268 -int SDL_iPhoneKeyboardHide(SDL_Window * window)
   143 +int SDL_iPhoneKeyboardHide(SDL_Window *window)
   269 +int SDL_iPhoneKeyboardHide(SDL_Window *window)
   145 -    SDL_uikitview *view = getWindowView(window);
   271 -    SDL_uikitview *view = getWindowView(window);
   146 +    SDL_uikitview *view = SDL_getUikitView(window);
   272 +    SDL_uikitview *view = SDL_getUikitView(window);
   147      if (view == nil) {
   273      if (view == nil) {
   148          return -1;
   274          return -1;
   149      }
   275      }
   150 @@ -350,9 +350,9 @@
   276 @@ -355,9 +355,9 @@
   151      return 0;
   277      return 0;
   152  }
   278  }
   153  
   279  
   154 -SDL_bool SDL_iPhoneKeyboardIsShown(SDL_Window * window)
   280 -SDL_bool SDL_iPhoneKeyboardIsShown(SDL_Window * window)
   155 +SDL_bool SDL_iPhoneKeyboardIsShown(SDL_Window *window)
   281 +SDL_bool SDL_iPhoneKeyboardIsShown(SDL_Window *window)
   157 -    SDL_uikitview *view = getWindowView(window);
   283 -    SDL_uikitview *view = getWindowView(window);
   158 +    SDL_uikitview *view = SDL_getUikitView(window);
   284 +    SDL_uikitview *view = SDL_getUikitView(window);
   159      if (view == nil) {
   285      if (view == nil) {
   160          return 0;
   286          return 0;
   161      }
   287      }
   162 @@ -360,9 +360,9 @@
   288 @@ -365,9 +365,9 @@
   163      return view.keyboardVisible;
   289      return view.keyboardVisible;
   164  }
   290  }
   165  
   291  
   166 -int SDL_iPhoneKeyboardToggle(SDL_Window * window)
   292 -int SDL_iPhoneKeyboardToggle(SDL_Window * window)
   167 +int SDL_iPhoneKeyboardToggle(SDL_Window *window)
   293 +int SDL_iPhoneKeyboardToggle(SDL_Window *window)
   169 -    SDL_uikitview *view = getWindowView(window);
   295 -    SDL_uikitview *view = getWindowView(window);
   170 +    SDL_uikitview *view = SDL_getUikitView(window);
   296 +    SDL_uikitview *view = SDL_getUikitView(window);
   171      if (view == nil) {
   297      if (view == nil) {
   172          return -1;
   298          return -1;
   173      }
   299      }
   174 @@ -380,24 +380,24 @@
   300 @@ -385,24 +385,24 @@
   175  
   301  
   176  /* stubs, used if compiled without keyboard support */
   302  /* stubs, used if compiled without keyboard support */
   177  
   303  
   178 -int SDL_iPhoneKeyboardShow(SDL_Window * window)
   304 -int SDL_iPhoneKeyboardShow(SDL_Window * window)
   179 +int SDL_iPhoneKeyboardShow(SDL_Window *window)
   305 +int SDL_iPhoneKeyboardShow(SDL_Window *window)
   198 -int SDL_iPhoneKeyboardToggle(SDL_Window * window)
   324 -int SDL_iPhoneKeyboardToggle(SDL_Window * window)
   199 +int SDL_iPhoneKeyboardToggle(SDL_Window *window)
   325 +int SDL_iPhoneKeyboardToggle(SDL_Window *window)
   200  {
   326  {
   201      SDL_SetError("Not compiled with keyboard support");
   327      SDL_SetError("Not compiled with keyboard support");
   202      return -1;
   328      return -1;
   203 diff -r 50560ca58f80 src/video/uikit/SDL_uikitviewcontroller.m
   329 diff -r 9738f2a8eee4 src/video/uikit/SDL_uikitviewcontroller.m
   204 --- a/src/video/uikit/SDL_uikitviewcontroller.m	Mon Oct 24 23:18:53 2011 -0400
   330 --- a/src/video/uikit/SDL_uikitviewcontroller.m	Wed Nov 09 02:35:49 2011 -0500
   205 +++ b/src/video/uikit/SDL_uikitviewcontroller.m	Wed Nov 02 09:22:08 2011 +0100
   331 +++ b/src/video/uikit/SDL_uikitviewcontroller.m	Sat Nov 12 21:55:27 2011 +0100
   206 @@ -28,8 +28,8 @@
   332 @@ -30,8 +30,8 @@
   207  
   333  
   208  #include "SDL_uikitwindow.h"
   334  #include "SDL_uikitwindow.h"
   209  
   335  
   210 -#import "SDL_uikitviewcontroller.h"
   336 -#import "SDL_uikitviewcontroller.h"
   211 -
   337 -
   212 +#include "SDL_uikitviewcontroller.h"
   338 +#include "SDL_uikitviewcontroller.h"
   213 +#include "SDL_uikitvideo.h"
   339 +#include "SDL_uikitvideo.h"
   214  
   340  
   215  @implementation SDL_uikitviewcontroller
   341  @implementation SDL_uikitviewcontroller
   216  
   342  
   217 @@ -116,38 +116,17 @@
   343 @@ -118,38 +118,17 @@
   218      const UIInterfaceOrientation toInterfaceOrientation = [self interfaceOrientation];
   344      const UIInterfaceOrientation toInterfaceOrientation = [self interfaceOrientation];
   219      SDL_WindowData *data = self->window->driverdata;
   345      SDL_WindowData *data = self->window->driverdata;
   220      UIWindow *uiwindow = data->uiwindow;
   346      UIWindow *uiwindow = data->uiwindow;
   221 -    UIScreen *uiscreen = [uiwindow screen];
   347 -    UIScreen *uiscreen = [uiwindow screen];
   222 +    UIScreen *uiscreen;
   348 +    UIScreen *uiscreen;
   256      [data->view updateFrame];
   382      [data->view updateFrame];
   257 -    SDL_SendWindowEvent(self->window, SDL_WINDOWEVENT_RESIZED, w, h);
   383 -    SDL_SendWindowEvent(self->window, SDL_WINDOWEVENT_RESIZED, w, h);
   258 +    SDL_SendWindowEvent(self->window, SDL_WINDOWEVENT_RESIZED, frame.size.width, frame.size.height);
   384 +    SDL_SendWindowEvent(self->window, SDL_WINDOWEVENT_RESIZED, frame.size.width, frame.size.height);
   259  }
   385  }
   260  
   386  
   261  @end
   387  #endif /* SDL_VIDEO_DRIVER_UIKIT */