project_files/HedgewarsMobile/SDL-50560ca58f80.patch
author unc0rr
Mon, 14 Nov 2011 13:28:16 +0400
branch0.9.17
changeset 6370 fb9aeddcb046
parent 6337 84e7d1a5e3df
permissions -rw-r--r--
Make server know release version
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6337
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
     1
diff -r 9738f2a8eee4 Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
     2
--- a/Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj	Wed Nov 09 02:35:49 2011 -0500
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
     3
+++ b/Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj	Sat Nov 12 21:55:27 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;
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
    48
diff -r 9738f2a8eee4 include/SDL_compat.h
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
    49
--- a/include/SDL_compat.h	Wed Nov 09 02:35:49 2011 -0500
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
    50
+++ b/include/SDL_compat.h	Sat Nov 12 21:55:27 2011 +0100
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
 
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
    60
diff -r 9738f2a8eee4 include/SDL_config_iphoneos.h
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
    61
--- a/include/SDL_config_iphoneos.h	Wed Nov 09 02:35:49 2011 -0500
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
    62
+++ b/include/SDL_config_iphoneos.h	Sat Nov 12 21:55:27 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
6337
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
    92
diff -r 9738f2a8eee4 include/SDL_events.h
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
    93
--- a/include/SDL_events.h	Wed Nov 09 02:35:49 2011 -0500
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
    94
+++ b/include/SDL_events.h	Sat Nov 12 21:55:27 2011 +0100
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()
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   109
diff -r 9738f2a8eee4 src/SDL_compat.c
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   110
--- a/src/SDL_compat.c	Wed Nov 09 02:35:49 2011 -0500
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   111
+++ b/src/SDL_compat.c	Sat Nov 12 21:55:27 2011 +0100
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: */
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   126
diff -r 9738f2a8eee4 src/video/SDL_surface.c
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   127
--- a/src/video/SDL_surface.c	Wed Nov 09 02:35:49 2011 -0500
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   128
+++ b/src/video/SDL_surface.c	Sat Nov 12 21:55:27 2011 +0100
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
 }
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   159
diff -r 9738f2a8eee4 src/video/uikit/SDL_uikitappdelegate.h
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   160
--- a/src/video/uikit/SDL_uikitappdelegate.h	Wed Nov 09 02:35:49 2011 -0500
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   161
+++ b/src/video/uikit/SDL_uikitappdelegate.h	Sat Nov 12 21:55:27 2011 +0100
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   162
@@ -24,7 +24,7 @@
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   163
 @interface SDLUIKitDelegate : NSObject<UIApplicationDelegate> {
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   164
 }
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   165
 
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   166
-+ (SDLUIKitDelegate *)sharedAppDelegate;
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   167
++ (id) sharedAppDelegate;
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   168
 + (NSString *)getAppDelegateClassName;
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   169
 
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   170
 @end
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   171
diff -r 9738f2a8eee4 src/video/uikit/SDL_uikitappdelegate.m
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   172
--- a/src/video/uikit/SDL_uikitappdelegate.m	Wed Nov 09 02:35:49 2011 -0500
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   173
+++ b/src/video/uikit/SDL_uikitappdelegate.m	Sat Nov 12 21:55:27 2011 +0100
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   174
@@ -79,10 +79,10 @@
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   175
 @implementation SDLUIKitDelegate
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   176
 
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   177
 /* convenience method */
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   178
-+ (SDLUIKitDelegate *)sharedAppDelegate
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   179
++ (id) sharedAppDelegate
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   180
 {
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   181
     /* the delegate is set in UIApplicationMain(), which is garaunteed to be called before this method */
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   182
-    return (SDLUIKitDelegate *)[[UIApplication sharedApplication] delegate];
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   183
+    return [[UIApplication sharedApplication] delegate];
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   184
 }
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   185
 
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   186
 + (NSString *)getAppDelegateClassName
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   187
diff -r 9738f2a8eee4 src/video/uikit/SDL_uikitopengles.m
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   188
--- a/src/video/uikit/SDL_uikitopengles.m	Wed Nov 09 02:35:49 2011 -0500
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   189
+++ b/src/video/uikit/SDL_uikitopengles.m	Sat Nov 12 21:55:27 2011 +0100
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   190
@@ -79,7 +79,7 @@
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   191
 
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   192
 void UIKit_GL_SwapWindow(_THIS, SDL_Window * window)
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   193
 {
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   194
-#ifdef SDL_POWER_UIKIT
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   195
+#if SDL_POWER_UIKIT
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   196
     // Check once a frame to see if we should turn off the battery monitor.
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   197
     SDL_UIKit_UpdateBatteryMonitoring();
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   198
 #endif
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   199
diff -r 9738f2a8eee4 src/video/uikit/SDL_uikitopenglview.m
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   200
--- a/src/video/uikit/SDL_uikitopenglview.m	Wed Nov 09 02:35:49 2011 -0500
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   201
+++ b/src/video/uikit/SDL_uikitopenglview.m	Sat Nov 12 21:55:27 2011 +0100
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   202
@@ -117,8 +117,8 @@
5697
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
   203
 
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
   204
         // !!! FIXME: use the screen this is on!
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
   205
         /* Use the main screen scale (for retina display support) */
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
   206
-        if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)])
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
   207
-            self.contentScaleFactor = [UIScreen mainScreen].scale;
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
   208
+        if ([self respondsToSelector:@selector(contentScaleFactor)])
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
   209
+            self.contentScaleFactor = [[UIScreen mainScreen] scale];
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
   210
 
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
   211
         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
   212
     }
6337
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   213
@@ -147,8 +147,8 @@
6207
cbc80c22691c updated sdl and lowered minimum ios to 3.0
koda
parents: 5702
diff changeset
   214
 
5697
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
   215
     // !!! FIXME: use the screen this is on!
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
   216
     /* Use the main screen scale (for retina display support) */
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
   217
-    if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)])
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
   218
-        self.contentScaleFactor = [UIScreen mainScreen].scale;
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
   219
+    if ([self respondsToSelector:@selector(contentScaleFactor)])
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
   220
+        self.contentScaleFactor = [[UIScreen mainScreen] scale];
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
   221
 }
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
   222
 
6207
cbc80c22691c updated sdl and lowered minimum ios to 3.0
koda
parents: 5702
diff changeset
   223
 - (void)setCurrentContext
6337
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   224
diff -r 9738f2a8eee4 src/video/uikit/SDL_uikitvideo.m
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   225
--- a/src/video/uikit/SDL_uikitvideo.m	Wed Nov 09 02:35:49 2011 -0500
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   226
+++ b/src/video/uikit/SDL_uikitvideo.m	Sat Nov 12 21:55:27 2011 +0100
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   227
@@ -201,10 +201,8 @@
6259
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   228
 {
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   229
     _this->gl_config.driver_loaded = 1;
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   230
 
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   231
-    NSString *reqSysVer = @"3.2";
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   232
-    NSString *currSysVer = [[UIDevice currentDevice] systemVersion];
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   233
-    if ([currSysVer compare:reqSysVer options:NSNumericSearch] != NSOrderedAscending)
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   234
-        SDL_UIKit_supports_multiple_displays = YES;
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   235
+    // this tells us whether we are running on ios >= 3.2
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   236
+    SDL_UIKit_supports_multiple_displays = [UIScreen instancesRespondToSelector:@selector(currentMode)];
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   237
 
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   238
     // Add the main screen.
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   239
     UIScreen *uiscreen = [UIScreen mainScreen];
6337
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   240
diff -r 9738f2a8eee4 src/video/uikit/SDL_uikitview.m
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   241
--- a/src/video/uikit/SDL_uikitview.m	Wed Nov 09 02:35:49 2011 -0500
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   242
+++ b/src/video/uikit/SDL_uikitview.m	Sat Nov 12 21:55:27 2011 +0100
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   243
@@ -316,7 +316,7 @@
6259
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   244
 /* iPhone keyboard addition functions */
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   245
 #if SDL_IPHONE_KEYBOARD
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   246
 
6337
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   247
-static SDL_uikitview * getWindowView(SDL_Window * window)
6259
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   248
+SDL_uikitview *SDL_getUikitView(SDL_Window *window)
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   249
 {
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   250
     if (window == NULL) {
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   251
         SDL_SetError("Window does not exist");
6337
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   252
@@ -333,9 +333,9 @@
6259
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   253
     return view;
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   254
 }
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   255
 
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   256
-int SDL_iPhoneKeyboardShow(SDL_Window * window)
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   257
+int SDL_iPhoneKeyboardShow(SDL_Window *window)
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   258
 {
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   259
-    SDL_uikitview *view = getWindowView(window);
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   260
+    SDL_uikitview *view = SDL_getUikitView(window);
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   261
     if (view == nil) {
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   262
         return -1;
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   263
     }
6337
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   264
@@ -344,9 +344,9 @@
6259
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   265
     return 0;
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   266
 }
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   267
 
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   268
-int SDL_iPhoneKeyboardHide(SDL_Window * window)
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   269
+int SDL_iPhoneKeyboardHide(SDL_Window *window)
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   270
 {
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   271
-    SDL_uikitview *view = getWindowView(window);
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   272
+    SDL_uikitview *view = SDL_getUikitView(window);
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   273
     if (view == nil) {
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   274
         return -1;
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   275
     }
6337
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   276
@@ -355,9 +355,9 @@
6259
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   277
     return 0;
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   278
 }
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   279
 
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   280
-SDL_bool SDL_iPhoneKeyboardIsShown(SDL_Window * window)
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   281
+SDL_bool SDL_iPhoneKeyboardIsShown(SDL_Window *window)
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   282
 {
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   283
-    SDL_uikitview *view = getWindowView(window);
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   284
+    SDL_uikitview *view = SDL_getUikitView(window);
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   285
     if (view == nil) {
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   286
         return 0;
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   287
     }
6337
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   288
@@ -365,9 +365,9 @@
6259
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   289
     return view.keyboardVisible;
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   290
 }
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   291
 
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   292
-int SDL_iPhoneKeyboardToggle(SDL_Window * window)
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   293
+int SDL_iPhoneKeyboardToggle(SDL_Window *window)
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   294
 {
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   295
-    SDL_uikitview *view = getWindowView(window);
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   296
+    SDL_uikitview *view = SDL_getUikitView(window);
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   297
     if (view == nil) {
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   298
         return -1;
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   299
     }
6337
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   300
@@ -385,24 +385,24 @@
6259
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   301
 
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   302
 /* stubs, used if compiled without keyboard support */
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   303
 
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   304
-int SDL_iPhoneKeyboardShow(SDL_Window * window)
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   305
+int SDL_iPhoneKeyboardShow(SDL_Window *window)
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   306
 {
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   307
     SDL_SetError("Not compiled with keyboard support");
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   308
     return -1;
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   309
 }
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   310
 
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   311
-int SDL_iPhoneKeyboardHide(SDL_Window * window)
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   312
+int SDL_iPhoneKeyboardHide(SDL_Window *window)
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   313
 {
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   314
     SDL_SetError("Not compiled with keyboard support");
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   315
     return -1;
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   316
 }
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   317
 
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   318
-SDL_bool SDL_iPhoneKeyboardIsShown(SDL_Window * window)
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   319
+SDL_bool SDL_iPhoneKeyboardIsShown(SDL_Window *window)
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   320
 {
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   321
     return 0;
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   322
 }
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   323
 
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   324
-int SDL_iPhoneKeyboardToggle(SDL_Window * window)
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   325
+int SDL_iPhoneKeyboardToggle(SDL_Window *window)
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   326
 {
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   327
     SDL_SetError("Not compiled with keyboard support");
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   328
     return -1;
6337
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   329
diff -r 9738f2a8eee4 src/video/uikit/SDL_uikitviewcontroller.m
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   330
--- a/src/video/uikit/SDL_uikitviewcontroller.m	Wed Nov 09 02:35:49 2011 -0500
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   331
+++ b/src/video/uikit/SDL_uikitviewcontroller.m	Sat Nov 12 21:55:27 2011 +0100
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   332
@@ -30,8 +30,8 @@
6259
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   333
 
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   334
 #include "SDL_uikitwindow.h"
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   335
 
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   336
-#import "SDL_uikitviewcontroller.h"
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   337
-
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   338
+#include "SDL_uikitviewcontroller.h"
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   339
+#include "SDL_uikitvideo.h"
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   340
 
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   341
 @implementation SDL_uikitviewcontroller
6207
cbc80c22691c updated sdl and lowered minimum ios to 3.0
koda
parents: 5702
diff changeset
   342
 
6337
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   343
@@ -118,38 +118,17 @@
6259
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   344
     const UIInterfaceOrientation toInterfaceOrientation = [self interfaceOrientation];
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   345
     SDL_WindowData *data = self->window->driverdata;
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   346
     UIWindow *uiwindow = data->uiwindow;
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   347
-    UIScreen *uiscreen = [uiwindow screen];
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   348
+    UIScreen *uiscreen;
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   349
+    if (SDL_UIKit_supports_multiple_displays)
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   350
+        uiscreen = [uiwindow screen];
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   351
+    else
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   352
+        uiscreen = [UIScreen mainScreen];
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   353
     const int noborder = self->window->flags & SDL_WINDOW_BORDERLESS;
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   354
     CGRect frame = noborder ? [uiscreen bounds] : [uiscreen applicationFrame];
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   355
-    const CGSize size = frame.size;
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   356
-    int w, h;
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   357
-
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   358
-    switch (toInterfaceOrientation) {
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   359
-        case UIInterfaceOrientationPortrait:
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   360
-        case UIInterfaceOrientationPortraitUpsideDown:
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   361
-            w = (size.width < size.height) ? size.width : size.height;
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   362
-            h = (size.width > size.height) ? size.width : size.height;
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   363
-            break;
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   364
-
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   365
-        case UIInterfaceOrientationLandscapeLeft:
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   366
-        case UIInterfaceOrientationLandscapeRight:
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   367
-            w = (size.width > size.height) ? size.width : size.height;
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   368
-            h = (size.width < size.height) ? size.width : size.height;
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   369
-            break;
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   370
-
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   371
-        default:
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   372
-            SDL_assert(0 && "Unexpected interface orientation!");
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   373
-            return;
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   374
-    }
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   375
-
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   376
-    frame.size.width = w;
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   377
-    frame.size.height = h;
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   378
-    frame.origin.x = 0;
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   379
-    frame.origin.y = 0;
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   380
 
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   381
     [uiwindow setFrame:frame];
5697
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
   382
     [data->view updateFrame];
6259
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   383
-    SDL_SendWindowEvent(self->window, SDL_WINDOWEVENT_RESIZED, w, h);
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   384
+    SDL_SendWindowEvent(self->window, SDL_WINDOWEVENT_RESIZED, frame.size.width, frame.size.height);
5697
e6630feefe88 the return of SDL.patch D:
koda
parents:
diff changeset
   385
 }
6259
02765411a912 move objc overlay creation after sdlwindow has been created
koda
parents: 6207
diff changeset
   386
 
6337
84e7d1a5e3df in class methods you can call [self alloc], as per objc specifications
koda
parents: 6259
diff changeset
   387
 #endif /* SDL_VIDEO_DRIVER_UIKIT */