project_files/HedgewarsMobile/SDL.patch
author koda
Sun, 31 Oct 2010 01:49:20 +0200
changeset 4028 eb371ada631d
parent 3978 9660600e43cb
child 4362 8dae325dc625
permissions -rw-r--r--
move functions called by pascal code outside controller
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3978
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
     1
diff -r c0021a587dc7 Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
     2
--- a/Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj	Sun Oct 10 15:45:58 2010 -0700
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
     3
+++ b/Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj	Sat Oct 16 18:35:03 2010 +0200
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
     4
@@ -1549,15 +1549,19 @@
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;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    20
-				SDKROOT = iphoneos3.2;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    21
+				SDKROOT = iphoneos4.0;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    22
 				TARGETED_DEVICE_FAMILY = "1,2";
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    23
 			};
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    24
 			name = Debug;
3978
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
    25
@@ -1566,14 +1570,19 @@
3923
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    26
 			isa = XCBuildConfiguration;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    27
 			buildSettings = {
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    28
 				ALWAYS_SEARCH_USER_PATHS = NO;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    29
-				ARCHS = "$(ARCHS_UNIVERSAL_IPHONE_OS)";
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    30
+				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    31
 				"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
    32
 				GCC_C_LANGUAGE_STANDARD = c99;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    33
+				GCC_OPTIMIZATION_LEVEL = 2;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    34
+				GCC_THUMB_SUPPORT = NO;
3978
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
    35
+				GCC_UNROLL_LOOPS = YES;
3923
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    36
+				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
    37
 				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
    38
 				GCC_WARN_UNUSED_VARIABLE = NO;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    39
+				HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../include\"";
3978
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
    40
 				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
    41
 				PREBINDING = NO;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    42
-				SDKROOT = iphoneos3.2;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    43
+				SDKROOT = iphoneos4.0;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    44
 				TARGETED_DEVICE_FAMILY = "1,2";
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    45
 			};
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    46
 			name = Release;
3978
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
    47
diff -r c0021a587dc7 Xcode-iPhoneOS/SDL/testsdl-Info.plist
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
    48
--- a/Xcode-iPhoneOS/SDL/testsdl-Info.plist	Sun Oct 10 15:45:58 2010 -0700
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
    49
+++ b/Xcode-iPhoneOS/SDL/testsdl-Info.plist	Sat Oct 16 18:35:03 2010 +0200
3923
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    50
@@ -16,7 +16,5 @@
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    51
 	<string>????</string>
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    52
 	<key>CFBundleVersion</key>
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    53
 	<string>1.0</string>
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    54
-	<key>NSMainNibFile</key>
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    55
-	<string>MainWindow</string>
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    56
 </dict>
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    57
 </plist>
3978
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
    58
diff -r c0021a587dc7 include/SDL_config_iphoneos.h
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
    59
--- a/include/SDL_config_iphoneos.h	Sun Oct 10 15:45:58 2010 -0700
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
    60
+++ b/include/SDL_config_iphoneos.h	Sat Oct 16 18:35:03 2010 +0200
3923
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    61
@@ -98,6 +98,8 @@
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    62
 #define HAVE_COS	1
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    63
 #define HAVE_COSF	1
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    64
 #define HAVE_FABS	1
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    65
+#define HAVE_ATAN       1
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    66
+#define HAVE_ATAN2      1
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    67
 #define HAVE_FLOOR	1
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    68
 #define HAVE_LOG	1
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    69
 #define HAVE_POW	1
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    70
@@ -114,7 +116,7 @@
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    71
 /* 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
    72
 #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
    73
 /* 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
    74
-#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
    75
+#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
    76
 
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    77
 /* 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
    78
 #define SDL_HAPTIC_DISABLED	1
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    79
@@ -135,7 +137,7 @@
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
 /* Supported video drivers */
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    82
 #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
    83
-#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
    84
+#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
    85
 
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    86
 /* enable OpenGL ES */
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    87
 #define SDL_VIDEO_OPENGL_ES	1
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    88
@@ -152,4 +154,7 @@
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    89
  */
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    90
 #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
    91
 
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    92
+/* 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
    93
+#define SDL_VIEW_TAG 456987
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    94
+
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
    95
 #endif /* _SDL_config_iphoneos_h */
3978
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
    96
diff -r c0021a587dc7 src/SDL_fatal.c
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
    97
--- a/src/SDL_fatal.c	Sun Oct 10 15:45:58 2010 -0700
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
    98
+++ b/src/SDL_fatal.c	Sat Oct 16 18:35:03 2010 +0200
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
    99
@@ -38,9 +38,9 @@
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
   100
 static void
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
   101
 SDL_Parachute(int sig)
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
   102
 {
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
   103
-    signal(sig, SIG_DFL);
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
   104
+    /*signal(sig, SIG_DFL);
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
   105
     SDL_Quit();
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
   106
-    raise(sig);
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
   107
+    raise(sig);*/
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
   108
 }
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
   109
 
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
   110
 static const int SDL_fatal_signals[] = {
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
   111
diff -r c0021a587dc7 src/video/SDL_renderer_gles.c
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
   112
--- a/src/video/SDL_renderer_gles.c	Sun Oct 10 15:45:58 2010 -0700
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
   113
+++ b/src/video/SDL_renderer_gles.c	Sat Oct 16 18:35:03 2010 +0200
3923
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   114
@@ -324,6 +324,9 @@
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   115
     data->glDisable(GL_CULL_FACE);
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   116
     data->updateSize = SDL_TRUE;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   117
 
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   118
+    data->glEnableClientState(GL_VERTEX_ARRAY);
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   119
+    data->glEnableClientState(GL_TEXTURE_COORD_ARRAY);
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   120
+    
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   121
     return renderer;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   122
 }
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   123
 
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   124
@@ -665,9 +668,7 @@
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   125
         vertices[2*i+1] = (GLshort)points[i].y;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   126
     }
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   127
     data->glVertexPointer(2, GL_SHORT, 0, vertices);
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   128
-    data->glEnableClientState(GL_VERTEX_ARRAY);
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   129
     data->glDrawArrays(GL_POINTS, 0, count);
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   130
-    data->glDisableClientState(GL_VERTEX_ARRAY);
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   131
     SDL_stack_free(vertices);
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   132
 
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   133
     return 0;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   134
@@ -694,7 +695,6 @@
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   135
         vertices[2*i+1] = (GLshort)points[i].y;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   136
     }
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   137
     data->glVertexPointer(2, GL_SHORT, 0, vertices);
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   138
-    data->glEnableClientState(GL_VERTEX_ARRAY);
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   139
     if (count > 2 && 
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   140
         points[0].x == points[count-1].x && points[0].y == points[count-1].y) {
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   141
         /* GL_LINE_LOOP takes care of the final segment */
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   142
@@ -703,7 +703,6 @@
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   143
     } else {
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   144
         data->glDrawArrays(GL_LINE_STRIP, 0, count);
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   145
     }
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   146
-    data->glDisableClientState(GL_VERTEX_ARRAY);
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   147
     SDL_stack_free(vertices);
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   148
 
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   149
     return 0;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   150
@@ -723,7 +722,6 @@
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   151
                     (GLfloat) renderer->b * inv255f,
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   152
                     (GLfloat) renderer->a * inv255f);
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   153
 
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   154
-    data->glEnableClientState(GL_VERTEX_ARRAY);
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   155
     for (i = 0; i < count; ++i) {
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   156
         const SDL_Rect *rect = rects[i];
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   157
         GLshort minx = rect->x;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   158
@@ -743,7 +741,6 @@
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   159
         data->glVertexPointer(2, GL_SHORT, 0, vertices);
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   160
         data->glDrawArrays(GL_LINE_LOOP, 0, 4);
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   161
     }
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   162
-    data->glDisableClientState(GL_VERTEX_ARRAY);
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   163
 
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   164
     return 0;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   165
 }
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   166
@@ -762,7 +759,6 @@
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   167
                     (GLfloat) renderer->b * inv255f,
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   168
                     (GLfloat) renderer->a * inv255f);
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   169
 
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   170
-    data->glEnableClientState(GL_VERTEX_ARRAY);
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   171
     for (i = 0; i < count; ++i) {
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   172
         const SDL_Rect *rect = rects[i];
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   173
         GLshort minx = rect->x;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   174
@@ -782,7 +778,6 @@
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   175
         data->glVertexPointer(2, GL_SHORT, 0, vertices);
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   176
         data->glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   177
     }
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   178
-    data->glDisableClientState(GL_VERTEX_ARRAY);
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   179
 
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   180
     return 0;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   181
 }
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   182
@@ -925,12 +920,8 @@
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   183
         texCoords[7] = maxv;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   184
 
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   185
         data->glVertexPointer(2, GL_SHORT, 0, vertices);
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   186
-        data->glEnableClientState(GL_VERTEX_ARRAY);
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   187
         data->glTexCoordPointer(2, GL_FLOAT, 0, texCoords);
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   188
-        data->glEnableClientState(GL_TEXTURE_COORD_ARRAY);
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   189
         data->glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   190
-        data->glDisableClientState(GL_TEXTURE_COORD_ARRAY);
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   191
-        data->glDisableClientState(GL_VERTEX_ARRAY);
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   192
     }
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   193
 
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   194
     data->glDisable(GL_TEXTURE_2D);
3978
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
   195
diff -r c0021a587dc7 src/video/SDL_video.c
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
   196
--- a/src/video/SDL_video.c	Sun Oct 10 15:45:58 2010 -0700
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
   197
+++ b/src/video/SDL_video.c	Sat Oct 16 18:35:03 2010 +0200
3923
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   198
@@ -1416,9 +1416,9 @@
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   199
         SDL_MinimizeWindow(window);
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   200
     }
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   201
 
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   202
-    if (display->gamma && _this->SetDisplayGammaRamp) {
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   203
+    /*if (display->gamma && _this->SetDisplayGammaRamp) {
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   204
         _this->SetDisplayGammaRamp(_this, display, display->saved_gamma);
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   205
-    }
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   206
+    }*/
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   207
     if ((window->flags & (SDL_WINDOW_INPUT_GRABBED | SDL_WINDOW_FULLSCREEN))
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   208
         && _this->SetWindowGrab) {
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   209
         _this->SetWindowGrab(_this, window);
3978
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
   210
diff -r c0021a587dc7 src/video/uikit/SDL_uikitopengles.m
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
   211
--- a/src/video/uikit/SDL_uikitopengles.m	Sun Oct 10 15:45:58 2010 -0700
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
   212
+++ b/src/video/uikit/SDL_uikitopengles.m	Sat Oct 16 18:35:03 2010 +0200
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
   213
@@ -114,8 +114,8 @@
3923
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   214
 									bBits: _this->gl_config.blue_size \
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   215
 									aBits: _this->gl_config.alpha_size \
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   216
 									depthBits: _this->gl_config.depth_size];
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   217
-	
3978
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
   218
-	data->view = view;
3923
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   219
+        view.tag = SDL_VIEW_TAG;
3978
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
   220
+        data->view = view;
3923
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   221
 	
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   222
 	/* add the view to our window */
3978
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
   223
 	[uiwindow addSubview: view ];
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
   224
diff -r c0021a587dc7 src/video/uikit/SDL_uikitview.m
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
   225
--- a/src/video/uikit/SDL_uikitview.m	Sun Oct 10 15:45:58 2010 -0700
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
   226
+++ b/src/video/uikit/SDL_uikitview.m	Sat Oct 16 18:35:03 2010 +0200
3923
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   227
@@ -35,9 +35,6 @@
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   228
 @implementation SDL_uikitview
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   229
 
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   230
 - (void)dealloc {
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   231
-#if SDL_IPHONE_KEYBOARD
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   232
-	[textField release];
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   233
-#endif
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   234
 	[super dealloc];
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   235
 }
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   236
 
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   237
@@ -220,7 +217,7 @@
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   238
 /* Set ourselves up as a UITextFieldDelegate */
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   239
 - (void)initializeKeyboard {
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   240
 		
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   241
-	textField = [[[UITextField alloc] initWithFrame: CGRectZero] autorelease];
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   242
+	textField = [[UITextField alloc] initWithFrame: CGRectZero];
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   243
 	textField.delegate = self;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   244
 	/* placeholder so there is something to delete! */
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   245
 	textField.text = @" ";	
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   246
@@ -238,6 +235,7 @@
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   247
 	keyboardVisible = NO;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   248
 	/* add the UITextField (hidden) to our view */
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   249
 	[self addSubview: textField];
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   250
+        [textField release];
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   251
 }
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   252
 
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   253
 /* reveal onscreen virtual keyboard */
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   254
@@ -300,6 +298,7 @@
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   255
 
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   256
 /* Terminates the editing session */
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   257
 - (BOOL)textFieldShouldReturn:(UITextField*)_textField {
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   258
+        SDL_SendKeyboardKey(SDL_PRESSED, SDL_SCANCODE_RETURN);
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   259
 	[self hideKeyboard];
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   260
 	return YES;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   261
 }
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   262
@@ -314,7 +313,7 @@
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   263
 int SDL_iPhoneKeyboardShow(SDL_Window * window) {
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   264
 	
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   265
 	SDL_WindowData *data;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   266
-	SDL_uikitview *view;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   267
+	SDL_uikitview *view = NULL;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   268
 	
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   269
 	if (NULL == window) {
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   270
 		SDL_SetError("Window does not exist");
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   271
@@ -322,7 +321,8 @@
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   272
 	}
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   273
 	
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   274
 	data = (SDL_WindowData *)window->driverdata;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   275
-	view = data->view;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   276
+	if (data != NULL)
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   277
+            view = data->view;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   278
 	
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   279
 	if (nil == view) {
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   280
 		SDL_SetError("Window has no view");
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   281
@@ -337,7 +337,7 @@
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   282
 int SDL_iPhoneKeyboardHide(SDL_Window * window) {
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   283
 	
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   284
 	SDL_WindowData *data;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   285
-	SDL_uikitview *view;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   286
+	SDL_uikitview *view = NULL;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   287
 	
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   288
 	if (NULL == window) {
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   289
 		SDL_SetError("Window does not exist");
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   290
@@ -345,7 +345,8 @@
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   291
 	}	
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   292
 	
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   293
 	data = (SDL_WindowData *)window->driverdata;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   294
-	view = data->view;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   295
+	if (data != NULL)
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   296
+            view = data->view;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   297
 	
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   298
 	if (NULL == view) {
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   299
 		SDL_SetError("Window has no view");
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   300
@@ -360,7 +361,7 @@
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   301
 SDL_bool SDL_iPhoneKeyboardIsShown(SDL_Window * window) {
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   302
 	
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   303
 	SDL_WindowData *data;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   304
-	SDL_uikitview *view;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   305
+	SDL_uikitview *view = NULL;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   306
 	
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   307
 	if (NULL == window) {
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   308
 		SDL_SetError("Window does not exist");
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   309
@@ -368,7 +369,8 @@
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   310
 	}	
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   311
 	
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   312
 	data = (SDL_WindowData *)window->driverdata;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   313
-	view = data->view;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   314
+	if (data != NULL)
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   315
+            view = data->view;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   316
 	
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   317
 	if (NULL == view) {
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   318
 		SDL_SetError("Window has no view");
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   319
@@ -382,7 +384,7 @@
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   320
 int SDL_iPhoneKeyboardToggle(SDL_Window * window) {
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   321
 	
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   322
 	SDL_WindowData *data;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   323
-	SDL_uikitview *view;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   324
+	SDL_uikitview *view = NULL;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   325
 	
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   326
 	if (NULL == window) {
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   327
 		SDL_SetError("Window does not exist");
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   328
@@ -390,7 +392,8 @@
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   329
 	}	
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   330
 	
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   331
 	data = (SDL_WindowData *)window->driverdata;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   332
-	view = data->view;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   333
+	if (data != NULL)
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   334
+            view = data->view;
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   335
 	
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   336
 	if (NULL == view) {
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   337
 		SDL_SetError("Window has no view");
3978
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
   338
diff -r c0021a587dc7 src/video/uikit/SDL_uikitwindow.m
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
   339
--- a/src/video/uikit/SDL_uikitwindow.m	Sun Oct 10 15:45:58 2010 -0700
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
   340
+++ b/src/video/uikit/SDL_uikitwindow.m	Sat Oct 16 18:35:03 2010 +0200
3923
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   341
@@ -144,7 +144,10 @@
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   342
     if (SDL_UIKit_supports_multiple_displays) {
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   343
         [uiwindow setScreen:uiscreen];
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   344
     }
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   345
-
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   346
+    
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   347
+    if ([[UIScreen screens] count] > 1)
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   348
+        uiwindow.screen = [[UIScreen screens] objectAtIndex:1];
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   349
+    
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   350
     if (SetupWindowData(_this, window, uiwindow, SDL_TRUE) < 0) {
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   351
         [uiwindow release];
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   352
         return -1;
3978
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
   353
diff -r c0021a587dc7 src/video/uikit/keyinfotable.h
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
   354
--- a/src/video/uikit/keyinfotable.h	Sun Oct 10 15:45:58 2010 -0700
9660600e43cb fix some glitches
koda
parents: 3923
diff changeset
   355
+++ b/src/video/uikit/keyinfotable.h	Sat Oct 16 18:35:03 2010 +0200
3923
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   356
@@ -54,7 +54,7 @@
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   357
 /*  10 */ {   SDL_SCANCODE_UNKNOWN, 0 },
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   358
 /*  11 */ {   SDL_SCANCODE_UNKNOWN, 0 },
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   359
 /*  12 */ {   SDL_SCANCODE_UNKNOWN, 0 },
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   360
-/*  13 */ {   SDL_SCANCODE_UNKNOWN, 0 },
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   361
+/*  13 */ {   SDL_SCANCODE_RETURN, 0 },
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   362
 /*  14 */ {   SDL_SCANCODE_UNKNOWN, 0 },
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   363
 /*  15 */ {   SDL_SCANCODE_UNKNOWN, 0 },
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   364
 /*  16 */ {   SDL_SCANCODE_UNKNOWN, 0 },
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   365
@@ -137,7 +137,7 @@
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   366
 /*  93 */ {   SDL_SCANCODE_RIGHTBRACKET, 0 },
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   367
 /*  94 */ {   SDL_SCANCODE_6,  KMOD_SHIFT },			/* plus shift modifier '^' */
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   368
 /*  95 */ {   SDL_SCANCODE_MINUS,  KMOD_SHIFT },		/* plus shift modifier '_' */
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   369
-/*  96 */ {   SDL_SCANCODE_GRAVE,  KMOD_SHIFT },		/* '`'
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   370
+/*  96 */ {   SDL_SCANCODE_GRAVE,  KMOD_SHIFT },		/* '`' */
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   371
 /*  97 */ {   SDL_SCANCODE_A, 0	},	
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   372
 /*  98 */ {   SDL_SCANCODE_B, 0 },
694e6f6e0e30 various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
diff changeset
   373
 /*  99 */ {   SDL_SCANCODE_C, 0 },