project_files/HedgewarsMobile/SDL-50560ca58f80.patch
author koda
Wed, 26 Oct 2011 00:30:35 +0200
changeset 6209 074ab6ebcb3e
parent 6207 cbc80c22691c
child 6259 02765411a912
permissions -rw-r--r--
restore runtime compatibility with ios 3.2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6207
cbc80c22691c updated sdl and lowered minimum ios to 3.0
koda
parents: 5702
diff changeset
     1
diff -r 50560ca58f80 Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj
cbc80c22691c updated sdl and lowered minimum ios to 3.0
koda
parents: 5702
diff changeset
     2
--- a/Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj	Mon Oct 24 23:18:53 2011 -0400
cbc80c22691c updated sdl and lowered minimum ios to 3.0
koda
parents: 5702
diff changeset
     3
+++ b/Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj	Tue Oct 25 22:13:19 2011 +0200
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";
6207
cbc80c22691c updated sdl and lowered minimum ios to 3.0
koda
parents: 5702
diff changeset
    32
diff -r 50560ca58f80 include/SDL_config_iphoneos.h
cbc80c22691c updated sdl and lowered minimum ios to 3.0
koda
parents: 5702
diff changeset
    33
--- a/include/SDL_config_iphoneos.h	Mon Oct 24 23:18:53 2011 -0400
cbc80c22691c updated sdl and lowered minimum ios to 3.0
koda
parents: 5702
diff changeset
    34
+++ b/include/SDL_config_iphoneos.h	Tue Oct 25 22:13:19 2011 +0200
5697
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    35
@@ -106,7 +106,7 @@
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    36
 /* enable iPhone version of Core Audio driver */
5702
944849ec04bf updated sdl.patch
koda
parents: 5697
diff changeset
    37
 #define SDL_AUDIO_DRIVER_COREAUDIO 1
5697
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    38
 /* Enable the dummy audio driver (src/audio/dummy/\*.c) */
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    39
-#define SDL_AUDIO_DRIVER_DUMMY	1
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    40
+#define SDL_AUDIO_DRIVER_DUMMY	0
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    41
 
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    42
 /* Enable the stub haptic driver (src/haptic/dummy/\*.c) */
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    43
 #define SDL_HAPTIC_DISABLED	1
6207
cbc80c22691c updated sdl and lowered minimum ios to 3.0
koda
parents: 5702
diff changeset
    44
@@ -132,16 +132,16 @@
5697
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    45
 /* enable OpenGL ES */
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    46
 #define SDL_VIDEO_OPENGL_ES	1
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    47
 #define SDL_VIDEO_RENDER_OGL_ES	1
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    48
-#define SDL_VIDEO_RENDER_OGL_ES2	1
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    49
+#define SDL_VIDEO_RENDER_OGL_ES2	0
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    50
 
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    51
 /* Enable system power support */
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    52
-#define SDL_POWER_UIKIT 1
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    53
+#define SDL_POWER_UIKIT 0
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    54
 
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    55
 /* enable iPhone keyboard support */
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    56
 #define SDL_IPHONE_KEYBOARD 1
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    57
 
6207
cbc80c22691c updated sdl and lowered minimum ios to 3.0
koda
parents: 5702
diff changeset
    58
 /* enable joystick subsystem */
cbc80c22691c updated sdl and lowered minimum ios to 3.0
koda
parents: 5702
diff changeset
    59
-#define SDL_JOYSTICK_DISABLED 0
5697
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    60
+#define SDL_JOYSTICK_DISABLED 1
6207
cbc80c22691c updated sdl and lowered minimum ios to 3.0
koda
parents: 5702
diff changeset
    61
 
5697
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    62
 /* Set max recognized G-force from accelerometer
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    63
    See src/joystick/uikit/SDLUIAccelerationDelegate.m for notes on why this is needed
6207
cbc80c22691c updated sdl and lowered minimum ios to 3.0
koda
parents: 5702
diff changeset
    64
diff -r 50560ca58f80 src/video/uikit/SDL_uikitopenglview.m
cbc80c22691c updated sdl and lowered minimum ios to 3.0
koda
parents: 5702
diff changeset
    65
--- a/src/video/uikit/SDL_uikitopenglview.m	Mon Oct 24 23:18:53 2011 -0400
cbc80c22691c updated sdl and lowered minimum ios to 3.0
koda
parents: 5702
diff changeset
    66
+++ b/src/video/uikit/SDL_uikitopenglview.m	Tue Oct 25 22:13:19 2011 +0200
cbc80c22691c updated sdl and lowered minimum ios to 3.0
koda
parents: 5702
diff changeset
    67
@@ -114,8 +114,8 @@
5697
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    68
 
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    69
         // !!! FIXME: use the screen this is on!
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    70
         /* Use the main screen scale (for retina display support) */
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    71
-        if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)])
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    72
-            self.contentScaleFactor = [UIScreen mainScreen].scale;
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    73
+        if ([self respondsToSelector:@selector(contentScaleFactor)])
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    74
+            self.contentScaleFactor = [[UIScreen mainScreen] scale];
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    75
 
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    76
         self.autoresizingMask = 0;  // don't allow autoresize, since we need to do some magic in -(void)updateFrame.
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    77
     }
6207
cbc80c22691c updated sdl and lowered minimum ios to 3.0
koda
parents: 5702
diff changeset
    78
@@ -144,8 +144,8 @@
cbc80c22691c updated sdl and lowered minimum ios to 3.0
koda
parents: 5702
diff changeset
    79
 
5697
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    80
     // !!! FIXME: use the screen this is on!
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    81
     /* Use the main screen scale (for retina display support) */
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    82
-    if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)])
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    83
-        self.contentScaleFactor = [UIScreen mainScreen].scale;
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    84
+    if ([self respondsToSelector:@selector(contentScaleFactor)])
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    85
+        self.contentScaleFactor = [[UIScreen mainScreen] scale];
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    86
 }
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    87
 
6207
cbc80c22691c updated sdl and lowered minimum ios to 3.0
koda
parents: 5702
diff changeset
    88
 - (void)setCurrentContext
cbc80c22691c updated sdl and lowered minimum ios to 3.0
koda
parents: 5702
diff changeset
    89
diff -r 50560ca58f80 src/video/uikit/SDL_uikitviewcontroller.m
cbc80c22691c updated sdl and lowered minimum ios to 3.0
koda
parents: 5702
diff changeset
    90
--- a/src/video/uikit/SDL_uikitviewcontroller.m	Mon Oct 24 23:18:53 2011 -0400
cbc80c22691c updated sdl and lowered minimum ios to 3.0
koda
parents: 5702
diff changeset
    91
+++ b/src/video/uikit/SDL_uikitviewcontroller.m	Tue Oct 25 22:13:19 2011 +0200
cbc80c22691c updated sdl and lowered minimum ios to 3.0
koda
parents: 5702
diff changeset
    92
@@ -145,7 +145,7 @@
5697
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    93
     frame.origin.x = 0;
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    94
     frame.origin.y = 0;
6207
cbc80c22691c updated sdl and lowered minimum ios to 3.0
koda
parents: 5702
diff changeset
    95
 
5697
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    96
-    [uiwindow setFrame:frame];
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    97
+    [uiwindow setFrame:[[UIScreen mainScreen] bounds]];
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    98
     [data->view updateFrame];
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
    99
     SDL_SendWindowEvent(self->window, SDL_WINDOWEVENT_RESIZED, w, h);
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
   100
 }