project_files/HedgewarsMobile/SDL-687400b595ab.patch
author unc0rr
Thu, 01 Dec 2011 18:02:27 +0400
changeset 6474 42e9773eedfd
parent 6409 ca93f38a1aab
permissions -rw-r--r--
- Improve renderer a bit, disallow nested functions - Start getting rid of nested functions
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6409
ca93f38a1aab SDL included some of our patches mainstream
koda
parents: 6337
diff changeset
     1
diff -r 687400b595ab Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj
ca93f38a1aab SDL included some of our patches mainstream
koda
parents: 6337
diff changeset
     2
--- a/Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj	Sat Nov 19 19:23:33 2011 -0500
ca93f38a1aab SDL included some of our patches mainstream
koda
parents: 6337
diff changeset
     3
+++ b/Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj	Sun Nov 20 18:57:07 2011 +0100
5702
944849ec04bf updated sdl.patch
koda
parents: 5697
diff changeset
     4
@@ -1596,9 +1596,12 @@
5697
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
     5
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
     6
 				GCC_C_LANGUAGE_STANDARD = c99;
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
     7
 				GCC_DEBUGGING_SYMBOLS = full;
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
     8
+				GCC_OPTIMIZATION_LEVEL = 0;
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
     9
+				GCC_THUMB_SUPPORT = NO;
6207
cbc80c22691c updated sdl and lowered minimum ios to 3.0
koda
parents: 5702
diff changeset
    10
+				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
5697
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    11
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    12
 				GCC_WARN_UNUSED_VARIABLE = NO;
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    13
-				IPHONEOS_DEPLOYMENT_TARGET = 3.1.3;
6207
cbc80c22691c updated sdl and lowered minimum ios to 3.0
koda
parents: 5702
diff changeset
    14
+				IPHONEOS_DEPLOYMENT_TARGET = 3.0;
5697
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    15
 				ONLY_ACTIVE_ARCH = NO;
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    16
 				PREBINDING = NO;
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    17
 				SDKROOT = iphoneos;
5702
944849ec04bf updated sdl.patch
koda
parents: 5697
diff changeset
    18
@@ -1613,9 +1616,12 @@
5697
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    19
 				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    20
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    21
 				GCC_C_LANGUAGE_STANDARD = c99;
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    22
+				GCC_FAST_MATH = YES;
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    23
+				GCC_THUMB_SUPPORT = NO;
6207
cbc80c22691c updated sdl and lowered minimum ios to 3.0
koda
parents: 5702
diff changeset
    24
+				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
5697
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    25
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    26
 				GCC_WARN_UNUSED_VARIABLE = NO;
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    27
-				IPHONEOS_DEPLOYMENT_TARGET = 3.1.3;
6207
cbc80c22691c updated sdl and lowered minimum ios to 3.0
koda
parents: 5702
diff changeset
    28
+				IPHONEOS_DEPLOYMENT_TARGET = 3.0;
5697
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    29
 				PREBINDING = NO;
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    30
 				SDKROOT = iphoneos;
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    31
 				TARGETED_DEVICE_FAMILY = "1,2";
6337
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
    32
@@ -1630,6 +1636,7 @@
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
    33
 				DEPLOYMENT_LOCATION = NO;
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
    34
 				GCC_DYNAMIC_NO_PIC = NO;
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
    35
 				GCC_OPTIMIZATION_LEVEL = 0;
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
    36
+				GCC_PREPROCESSOR_DEFINITIONS = SDL_NO_COMPAT;
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
    37
 				PREBINDING = NO;
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
    38
 				PRODUCT_NAME = SDL;
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
    39
 				SKIP_INSTALL = YES;
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
    40
@@ -1644,6 +1651,7 @@
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
    41
 				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
    42
 				DEPLOYMENT_LOCATION = NO;
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
    43
 				GCC_ENABLE_FIX_AND_CONTINUE = NO;
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
    44
+				GCC_PREPROCESSOR_DEFINITIONS = SDL_NO_COMPAT;
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
    45
 				PREBINDING = NO;
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
    46
 				PRODUCT_NAME = SDL;
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
    47
 				SKIP_INSTALL = YES;
6409
ca93f38a1aab SDL included some of our patches mainstream
koda
parents: 6337
diff changeset
    48
diff -r 687400b595ab include/SDL_compat.h
ca93f38a1aab SDL included some of our patches mainstream
koda
parents: 6337
diff changeset
    49
--- a/include/SDL_compat.h	Sat Nov 19 19:23:33 2011 -0500
ca93f38a1aab SDL included some of our patches mainstream
koda
parents: 6337
diff changeset
    50
+++ b/include/SDL_compat.h	Sun Nov 20 18:57:07 2011 +0100
6337
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
    51
@@ -40,7 +40,7 @@
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
    52
 
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
    53
  /*@}*/
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
    54
 
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
    55
-#ifdef SDL_NO_COMPAT
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
    56
+#ifndef SDL_NO_COMPAT
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
    57
 #define _SDL_compat_h
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
    58
 #endif
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
    59
 
6409
ca93f38a1aab SDL included some of our patches mainstream
koda
parents: 6337
diff changeset
    60
diff -r 687400b595ab include/SDL_config_iphoneos.h
ca93f38a1aab SDL included some of our patches mainstream
koda
parents: 6337
diff changeset
    61
--- a/include/SDL_config_iphoneos.h	Sat Nov 19 19:23:33 2011 -0500
ca93f38a1aab SDL included some of our patches mainstream
koda
parents: 6337
diff changeset
    62
+++ b/include/SDL_config_iphoneos.h	Sun Nov 20 18:57:07 2011 +0100
5697
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    63
@@ -106,7 +106,7 @@
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    64
 /* enable iPhone version of Core Audio driver */
5702
944849ec04bf updated sdl.patch
koda
parents: 5697
diff changeset
    65
 #define SDL_AUDIO_DRIVER_COREAUDIO 1
5697
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    66
 /* Enable the dummy audio driver (src/audio/dummy/\*.c) */
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    67
-#define SDL_AUDIO_DRIVER_DUMMY	1
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    68
+#define SDL_AUDIO_DRIVER_DUMMY	0
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    69
 
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    70
 /* Enable the stub haptic driver (src/haptic/dummy/\*.c) */
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    71
 #define SDL_HAPTIC_DISABLED	1
6207
cbc80c22691c updated sdl and lowered minimum ios to 3.0
koda
parents: 5702
diff changeset
    72
@@ -132,16 +132,16 @@
5697
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    73
 /* enable OpenGL ES */
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    74
 #define SDL_VIDEO_OPENGL_ES	1
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    75
 #define SDL_VIDEO_RENDER_OGL_ES	1
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    76
-#define SDL_VIDEO_RENDER_OGL_ES2	1
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    77
+#define SDL_VIDEO_RENDER_OGL_ES2	0
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    78
 
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    79
 /* Enable system power support */
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    80
-#define SDL_POWER_UIKIT 1
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    81
+#define SDL_POWER_UIKIT 0
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    82
 
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    83
 /* enable iPhone keyboard support */
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    84
 #define SDL_IPHONE_KEYBOARD 1
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    85
 
6207
cbc80c22691c updated sdl and lowered minimum ios to 3.0
koda
parents: 5702
diff changeset
    86
 /* enable joystick subsystem */
cbc80c22691c updated sdl and lowered minimum ios to 3.0
koda
parents: 5702
diff changeset
    87
-#define SDL_JOYSTICK_DISABLED 0
5697
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    88
+#define SDL_JOYSTICK_DISABLED 1
6207
cbc80c22691c updated sdl and lowered minimum ios to 3.0
koda
parents: 5702
diff changeset
    89
 
5697
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    90
 /* Set max recognized G-force from accelerometer
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    91
    See src/joystick/uikit/SDLUIAccelerationDelegate.m for notes on why this is needed
6409
ca93f38a1aab SDL included some of our patches mainstream
koda
parents: 6337
diff changeset
    92
diff -r 687400b595ab include/SDL_events.h
ca93f38a1aab SDL included some of our patches mainstream
koda
parents: 6337
diff changeset
    93
--- a/include/SDL_events.h	Sat Nov 19 19:23:33 2011 -0500
ca93f38a1aab SDL included some of our patches mainstream
koda
parents: 6337
diff changeset
    94
+++ b/include/SDL_events.h	Sun Nov 20 18:57:07 2011 +0100
6337
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
    95
@@ -107,11 +107,12 @@
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
    96
 
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
    97
     SDL_CLIPBOARDUPDATE = 0x900, /**< The clipboard changed */
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
    98
 
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
    99
+#ifndef SDL_NO_COMPAT
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   100
     /* Obsolete events */
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   101
     SDL_EVENT_COMPAT1 = 0x7000, /**< SDL 1.2 events for compatibility */
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   102
     SDL_EVENT_COMPAT2,
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   103
     SDL_EVENT_COMPAT3,
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   104
-
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   105
+#endif
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   106
 
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   107
     /** Events ::SDL_USEREVENT through ::SDL_LASTEVENT are for your use,
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   108
      *  and should be allocated with SDL_RegisterEvents()
6409
ca93f38a1aab SDL included some of our patches mainstream
koda
parents: 6337
diff changeset
   109
diff -r 687400b595ab src/SDL_compat.c
ca93f38a1aab SDL included some of our patches mainstream
koda
parents: 6337
diff changeset
   110
--- a/src/SDL_compat.c	Sat Nov 19 19:23:33 2011 -0500
ca93f38a1aab SDL included some of our patches mainstream
koda
parents: 6337
diff changeset
   111
+++ b/src/SDL_compat.c	Sun Nov 20 18:57:07 2011 +0100
6337
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   112
@@ -29,6 +29,7 @@
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   113
 #include "video/SDL_pixels_c.h"
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   114
 #include "render/SDL_yuv_sw_c.h"
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   115
 
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   116
+#ifndef SDL_NO_COMPAT
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   117
 
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   118
 static SDL_Window *SDL_VideoWindow = NULL;
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   119
 static SDL_Surface *SDL_WindowSurface = NULL;
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   120
@@ -1813,4 +1814,5 @@
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   121
     return 0;
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   122
 }
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   123
 
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   124
+#endif /* SDL_NO_COMPAT */
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   125
 /* vi: set ts=4 sw=4 expandtab: */
6409
ca93f38a1aab SDL included some of our patches mainstream
koda
parents: 6337
diff changeset
   126
diff -r 687400b595ab src/video/SDL_surface.c
ca93f38a1aab SDL included some of our patches mainstream
koda
parents: 6337
diff changeset
   127
--- a/src/video/SDL_surface.c	Sat Nov 19 19:23:33 2011 -0500
ca93f38a1aab SDL included some of our patches mainstream
koda
parents: 6337
diff changeset
   128
+++ b/src/video/SDL_surface.c	Sun Nov 20 18:57:07 2011 +0100
6337
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   129
@@ -195,12 +195,14 @@
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   130
         SDL_InvalidateMap(surface->map);
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   131
     }
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   132
 
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   133
+#ifndef SDL_NO_COMPAT
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   134
     /* Compatibility mode */
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   135
     if (surface->map->info.flags & SDL_COPY_COLORKEY) {
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   136
         surface->flags |= SDL_SRCCOLORKEY;
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   137
     } else {
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   138
         surface->flags &= ~SDL_SRCCOLORKEY;
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   139
     }
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   140
+#endif
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   141
 
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   142
     return 0;
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   143
 }
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   144
@@ -405,12 +407,14 @@
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   145
         SDL_InvalidateMap(surface->map);
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   146
     }
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   147
 
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   148
+#ifndef SDL_NO_COMPAT
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   149
     /* Compatibility mode */
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   150
     if (surface->map->info.flags & SDL_COPY_BLEND) {
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   151
         surface->flags |= SDL_SRCALPHA;
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   152
     } else {
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   153
         surface->flags &= ~SDL_SRCALPHA;
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   154
     }
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   155
+#endif
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   156
 
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   157
     return status;
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   158
 }
6409
ca93f38a1aab SDL included some of our patches mainstream
koda
parents: 6337
diff changeset
   159
diff -r 687400b595ab src/video/uikit/SDL_uikitopenglview.m
ca93f38a1aab SDL included some of our patches mainstream
koda
parents: 6337
diff changeset
   160
--- a/src/video/uikit/SDL_uikitopenglview.m	Sat Nov 19 19:23:33 2011 -0500
ca93f38a1aab SDL included some of our patches mainstream
koda
parents: 6337
diff changeset
   161
+++ b/src/video/uikit/SDL_uikitopenglview.m	Sun Nov 20 18:57:07 2011 +0100
ca93f38a1aab SDL included some of our patches mainstream
koda
parents: 6337
diff changeset
   162
@@ -80,7 +80,7 @@
5697
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
   163
 
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
   164
         // !!! FIXME: use the screen this is on!
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
   165
         /* Use the main screen scale (for retina display support) */
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
   166
-        if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)])
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
   167
+        if ([self respondsToSelector:@selector(contentScaleFactor)])
6409
ca93f38a1aab SDL included some of our patches mainstream
koda
parents: 6337
diff changeset
   168
             self.contentScaleFactor = [UIScreen mainScreen].scale;
6259
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   169
 
6409
ca93f38a1aab SDL included some of our patches mainstream
koda
parents: 6337
diff changeset
   170
         /* create the buffers */
ca93f38a1aab SDL included some of our patches mainstream
koda
parents: 6337
diff changeset
   171
diff -r 687400b595ab src/video/uikit/SDL_uikitviewcontroller.m
ca93f38a1aab SDL included some of our patches mainstream
koda
parents: 6337
diff changeset
   172
--- a/src/video/uikit/SDL_uikitviewcontroller.m	Sat Nov 19 19:23:33 2011 -0500
ca93f38a1aab SDL included some of our patches mainstream
koda
parents: 6337
diff changeset
   173
+++ b/src/video/uikit/SDL_uikitviewcontroller.m	Sun Nov 20 18:57:07 2011 +0100
ca93f38a1aab SDL included some of our patches mainstream
koda
parents: 6337
diff changeset
   174
@@ -29,9 +29,8 @@
ca93f38a1aab SDL included some of our patches mainstream
koda
parents: 6337
diff changeset
   175
 #include "../../events/SDL_events_c.h"
6259
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   176
 
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   177
 #include "SDL_uikitwindow.h"
6409
ca93f38a1aab SDL included some of our patches mainstream
koda
parents: 6337
diff changeset
   178
-
6259
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   179
-#import "SDL_uikitviewcontroller.h"
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   180
-
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   181
+#include "SDL_uikitviewcontroller.h"
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   182
+#include "SDL_uikitvideo.h"
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   183
 
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   184
 @implementation SDL_uikitviewcontroller
6207
cbc80c22691c updated sdl and lowered minimum ios to 3.0
koda
parents: 5702
diff changeset
   185
 
6409
ca93f38a1aab SDL included some of our patches mainstream
koda
parents: 6337
diff changeset
   186
@@ -114,7 +113,11 @@
6259
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   187
     const UIInterfaceOrientation toInterfaceOrientation = [self interfaceOrientation];
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   188
     SDL_WindowData *data = self->window->driverdata;
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   189
     UIWindow *uiwindow = data->uiwindow;
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   190
-    UIScreen *uiscreen = [uiwindow screen];
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   191
+    UIScreen *uiscreen;
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   192
+    if (SDL_UIKit_supports_multiple_displays)
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   193
+        uiscreen = [uiwindow screen];
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   194
+    else
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   195
+        uiscreen = [UIScreen mainScreen];
6409
ca93f38a1aab SDL included some of our patches mainstream
koda
parents: 6337
diff changeset
   196
     const int noborder = (self->window->flags & (SDL_WINDOW_FULLSCREEN|SDL_WINDOW_BORDERLESS));
6259
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   197
     CGRect frame = noborder ? [uiscreen bounds] : [uiscreen applicationFrame];
6409
ca93f38a1aab SDL included some of our patches mainstream
koda
parents: 6337
diff changeset
   198
     const CGSize size = frame.size;