project_files/HedgewarsMobile/SDL.patch
author koda
Wed, 02 Mar 2011 00:27:20 +0100
changeset 4976 088d40d8aba2
parent 4945 541d35d1f2e8
child 5004 2efa6a414518
permissions -rw-r--r--
Happy 2011 :)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4933
86bd82d58a0b update sdl apis to use the new rendering functions
koda
parents: 4773
diff changeset
     1
diff -r 1fbe1c202501 Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj
86bd82d58a0b update sdl apis to use the new rendering functions
koda
parents: 4773
diff changeset
     2
--- a/Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj	Mon Feb 07 10:40:21 2011 -0800
4945
541d35d1f2e8 in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents: 4934
diff changeset
     3
+++ b/Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj	Fri Feb 18 00:09:03 2011 +0100
4933
86bd82d58a0b update sdl apis to use the new rendering functions
koda
parents: 4773
diff changeset
     4
@@ -1603,11 +1603,15 @@
3923
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
     5
 			isa = XCBuildConfiguration;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
     6
 			buildSettings = {
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
     7
 				ALWAYS_SEARCH_USER_PATHS = NO;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
     8
+				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
     9
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    10
 				GCC_C_LANGUAGE_STANDARD = c99;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    11
 				GCC_DEBUGGING_SYMBOLS = full;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    12
+				GCC_THUMB_SUPPORT = NO;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    13
+				GCC_VERSION = com.apple.compilers.llvmgcc42;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    14
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    15
 				GCC_WARN_UNUSED_VARIABLE = NO;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    16
+				HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../include\"";
3978
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
    17
 				IPHONEOS_DEPLOYMENT_TARGET = 3.1;
3923
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    18
 				ONLY_ACTIVE_ARCH = NO;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    19
 				PREBINDING = NO;
4933
86bd82d58a0b update sdl apis to use the new rendering functions
koda
parents: 4773
diff changeset
    20
@@ -1620,12 +1624,18 @@
3923
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    21
 			isa = XCBuildConfiguration;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    22
 			buildSettings = {
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    23
 				ALWAYS_SEARCH_USER_PATHS = NO;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    24
-				ARCHS = "$(ARCHS_UNIVERSAL_IPHONE_OS)";
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    25
+				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    26
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    27
 				GCC_C_LANGUAGE_STANDARD = c99;
4773
69f8431a5d20 yay, sdl resumed development and accepted some of our patches in mainstream
koda
parents: 4454
diff changeset
    28
+				GCC_OPTIMIZATION_LEVEL = s;
3923
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    29
+				GCC_THUMB_SUPPORT = NO;
4773
69f8431a5d20 yay, sdl resumed development and accepted some of our patches in mainstream
koda
parents: 4454
diff changeset
    30
+				GCC_UNROLL_LOOPS = NO;
3923
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    31
+				GCC_VERSION = com.apple.compilers.llvmgcc42;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    32
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    33
 				GCC_WARN_UNUSED_VARIABLE = NO;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    34
+				HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../include\"";
3978
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
    35
 				IPHONEOS_DEPLOYMENT_TARGET = 3.1;
4773
69f8431a5d20 yay, sdl resumed development and accepted some of our patches in mainstream
koda
parents: 4454
diff changeset
    36
+				OTHER_CFLAGS = "";
3923
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    37
 				PREBINDING = NO;
4773
69f8431a5d20 yay, sdl resumed development and accepted some of our patches in mainstream
koda
parents: 4454
diff changeset
    38
 				SDKROOT = iphoneos;
3923
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    39
 				TARGETED_DEVICE_FAMILY = "1,2";
4933
86bd82d58a0b update sdl apis to use the new rendering functions
koda
parents: 4773
diff changeset
    40
diff -r 1fbe1c202501 include/SDL_config_iphoneos.h
86bd82d58a0b update sdl apis to use the new rendering functions
koda
parents: 4773
diff changeset
    41
--- a/include/SDL_config_iphoneos.h	Mon Feb 07 10:40:21 2011 -0800
4945
541d35d1f2e8 in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents: 4934
diff changeset
    42
+++ b/include/SDL_config_iphoneos.h	Fri Feb 18 00:09:03 2011 +0100
4773
69f8431a5d20 yay, sdl resumed development and accepted some of our patches in mainstream
koda
parents: 4454
diff changeset
    43
@@ -119,7 +119,7 @@
3923
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    44
 /* enable iPhone version of Core Audio driver */
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    45
 #define SDL_AUDIO_DRIVER_COREAUDIOIPHONE 1
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    46
 /* Enable the dummy audio driver (src/audio/dummy/\*.c) */
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    47
-#define SDL_AUDIO_DRIVER_DUMMY	1
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    48
+#define SDL_AUDIO_DRIVER_DUMMY	0
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    49
 
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    50
 /* Enable the stub haptic driver (src/haptic/dummy/\*.c) */
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    51
 #define SDL_HAPTIC_DISABLED	1
4933
86bd82d58a0b update sdl apis to use the new rendering functions
koda
parents: 4773
diff changeset
    52
@@ -140,15 +140,18 @@
3923
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    53
 
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    54
 /* Supported video drivers */
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    55
 #define SDL_VIDEO_DRIVER_UIKIT	1
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    56
-#define SDL_VIDEO_DRIVER_DUMMY	1
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    57
+#define SDL_VIDEO_DRIVER_DUMMY	0
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    58
 
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    59
 /* enable OpenGL ES */
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    60
 #define SDL_VIDEO_OPENGL_ES	1
4773
69f8431a5d20 yay, sdl resumed development and accepted some of our patches in mainstream
koda
parents: 4454
diff changeset
    61
 #define SDL_VIDEO_RENDER_OGL_ES	1
4933
86bd82d58a0b update sdl apis to use the new rendering functions
koda
parents: 4773
diff changeset
    62
-#define SDL_VIDEO_RENDER_OGL_ES2	1
86bd82d58a0b update sdl apis to use the new rendering functions
koda
parents: 4773
diff changeset
    63
+#define SDL_VIDEO_RENDER_OGL_ES2	0
4773
69f8431a5d20 yay, sdl resumed development and accepted some of our patches in mainstream
koda
parents: 4454
diff changeset
    64
 
69f8431a5d20 yay, sdl resumed development and accepted some of our patches in mainstream
koda
parents: 4454
diff changeset
    65
 /* Enable system power support */
69f8431a5d20 yay, sdl resumed development and accepted some of our patches in mainstream
koda
parents: 4454
diff changeset
    66
-#define SDL_POWER_UIKIT 1
69f8431a5d20 yay, sdl resumed development and accepted some of our patches in mainstream
koda
parents: 4454
diff changeset
    67
+#define SDL_POWER_UIKIT 0
69f8431a5d20 yay, sdl resumed development and accepted some of our patches in mainstream
koda
parents: 4454
diff changeset
    68
+
69f8431a5d20 yay, sdl resumed development and accepted some of our patches in mainstream
koda
parents: 4454
diff changeset
    69
+/* enable joystick subsystem */
69f8431a5d20 yay, sdl resumed development and accepted some of our patches in mainstream
koda
parents: 4454
diff changeset
    70
+#define SDL_JOYSTICK_DISABLED 1
69f8431a5d20 yay, sdl resumed development and accepted some of our patches in mainstream
koda
parents: 4454
diff changeset
    71
 
69f8431a5d20 yay, sdl resumed development and accepted some of our patches in mainstream
koda
parents: 4454
diff changeset
    72
 /* enable iPhone keyboard support */
69f8431a5d20 yay, sdl resumed development and accepted some of our patches in mainstream
koda
parents: 4454
diff changeset
    73
 #define SDL_IPHONE_KEYBOARD 1
4933
86bd82d58a0b update sdl apis to use the new rendering functions
koda
parents: 4773
diff changeset
    74
@@ -158,4 +161,7 @@
3923
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    75
  */
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    76
 #define SDL_IPHONE_MAX_GFORCE 5.0
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    77
 
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    78
+/* Tag to grab the uikit view from external code for further modification */
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    79
+#define SDL_VIEW_TAG 456987
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    80
+
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    81
 #endif /* _SDL_config_iphoneos_h */
4945
541d35d1f2e8 in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents: 4934
diff changeset
    82
diff -r 1fbe1c202501 src/video/SDL_video.c
541d35d1f2e8 in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents: 4934
diff changeset
    83
--- a/src/video/SDL_video.c	Mon Feb 07 10:40:21 2011 -0800
541d35d1f2e8 in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents: 4934
diff changeset
    84
+++ b/src/video/SDL_video.c	Fri Feb 18 00:09:03 2011 +0100
541d35d1f2e8 in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents: 4934
diff changeset
    85
@@ -1657,9 +1657,11 @@
541d35d1f2e8 in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents: 4934
diff changeset
    86
         SDL_MinimizeWindow(window);
541d35d1f2e8 in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents: 4934
diff changeset
    87
     }
541d35d1f2e8 in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents: 4934
diff changeset
    88
 
541d35d1f2e8 in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents: 4934
diff changeset
    89
+    /*
541d35d1f2e8 in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents: 4934
diff changeset
    90
     if (display->gamma && _this->SetDisplayGammaRamp) {
541d35d1f2e8 in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents: 4934
diff changeset
    91
         _this->SetDisplayGammaRamp(_this, display, display->saved_gamma);
541d35d1f2e8 in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents: 4934
diff changeset
    92
     }
541d35d1f2e8 in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents: 4934
diff changeset
    93
+    */
541d35d1f2e8 in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents: 4934
diff changeset
    94
     if ((window->flags & (SDL_WINDOW_INPUT_GRABBED | SDL_WINDOW_FULLSCREEN))
541d35d1f2e8 in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents: 4934
diff changeset
    95
         && _this->SetWindowGrab) {
541d35d1f2e8 in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents: 4934
diff changeset
    96
         _this->SetWindowGrab(_this, window);
4934
727da72f754a i obviously forgot one piece
koda
parents: 4933
diff changeset
    97
diff -r 1fbe1c202501 src/video/uikit/SDL_uikitopengles.m
727da72f754a i obviously forgot one piece
koda
parents: 4933
diff changeset
    98
--- a/src/video/uikit/SDL_uikitopengles.m	Mon Feb 07 10:40:21 2011 -0800
4945
541d35d1f2e8 in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents: 4934
diff changeset
    99
+++ b/src/video/uikit/SDL_uikitopengles.m	Fri Feb 18 00:09:03 2011 +0100
4934
727da72f754a i obviously forgot one piece
koda
parents: 4933
diff changeset
   100
@@ -117,6 +117,7 @@
727da72f754a i obviously forgot one piece
koda
parents: 4933
diff changeset
   101
                                     majorVersion: _this->gl_config.major_version];
727da72f754a i obviously forgot one piece
koda
parents: 4933
diff changeset
   102
     
727da72f754a i obviously forgot one piece
koda
parents: 4933
diff changeset
   103
     data->view = view;
727da72f754a i obviously forgot one piece
koda
parents: 4933
diff changeset
   104
+    view.tag = SDL_VIEW_TAG;
727da72f754a i obviously forgot one piece
koda
parents: 4933
diff changeset
   105
     
727da72f754a i obviously forgot one piece
koda
parents: 4933
diff changeset
   106
     /* add the view to our window */
727da72f754a i obviously forgot one piece
koda
parents: 4933
diff changeset
   107
     [uiwindow addSubview: view ];