|
1 diff -r 91c9a69dd2ad Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj |
|
2 --- a/Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj Mon Aug 29 00:27:43 2011 -0400 |
|
3 +++ b/Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj Mon Aug 29 23:56:04 2011 +0200 |
|
4 @@ -1596,9 +1596,12 @@ |
|
5 "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; |
|
6 GCC_C_LANGUAGE_STANDARD = c99; |
|
7 GCC_DEBUGGING_SYMBOLS = full; |
|
8 + GCC_OPTIMIZATION_LEVEL = 0; |
|
9 + GCC_THUMB_SUPPORT = NO; |
|
10 + GCC_VERSION = com.apple.compilers.llvmgcc42; |
|
11 GCC_WARN_ABOUT_RETURN_TYPE = YES; |
|
12 GCC_WARN_UNUSED_VARIABLE = NO; |
|
13 - IPHONEOS_DEPLOYMENT_TARGET = 3.1.3; |
|
14 + IPHONEOS_DEPLOYMENT_TARGET = 4.0; |
|
15 ONLY_ACTIVE_ARCH = NO; |
|
16 PREBINDING = NO; |
|
17 SDKROOT = iphoneos; |
|
18 @@ -1613,9 +1616,12 @@ |
|
19 ARCHS = "$(ARCHS_STANDARD_32_BIT)"; |
|
20 "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; |
|
21 GCC_C_LANGUAGE_STANDARD = c99; |
|
22 + GCC_FAST_MATH = YES; |
|
23 + GCC_THUMB_SUPPORT = NO; |
|
24 + GCC_VERSION = com.apple.compilers.llvmgcc42; |
|
25 GCC_WARN_ABOUT_RETURN_TYPE = YES; |
|
26 GCC_WARN_UNUSED_VARIABLE = NO; |
|
27 - IPHONEOS_DEPLOYMENT_TARGET = 3.1.3; |
|
28 + IPHONEOS_DEPLOYMENT_TARGET = 4.0; |
|
29 PREBINDING = NO; |
|
30 SDKROOT = iphoneos; |
|
31 TARGETED_DEVICE_FAMILY = "1,2"; |
|
32 diff -r 91c9a69dd2ad include/SDL_config_iphoneos.h |
|
33 --- a/include/SDL_config_iphoneos.h Mon Aug 29 00:27:43 2011 -0400 |
|
34 +++ b/include/SDL_config_iphoneos.h Mon Aug 29 23:56:04 2011 +0200 |
|
35 @@ -106,7 +106,7 @@ |
|
36 /* enable iPhone version of Core Audio driver */ |
|
37 #define SDL_AUDIO_DRIVER_COREAUDIO 1 |
|
38 /* Enable the dummy audio driver (src/audio/dummy/\*.c) */ |
|
39 -#define SDL_AUDIO_DRIVER_DUMMY 1 |
|
40 +#define SDL_AUDIO_DRIVER_DUMMY 0 |
|
41 |
|
42 /* Enable the stub haptic driver (src/haptic/dummy/\*.c) */ |
|
43 #define SDL_HAPTIC_DISABLED 1 |
|
44 @@ -132,14 +132,17 @@ |
|
45 /* enable OpenGL ES */ |
|
46 #define SDL_VIDEO_OPENGL_ES 1 |
|
47 #define SDL_VIDEO_RENDER_OGL_ES 1 |
|
48 -#define SDL_VIDEO_RENDER_OGL_ES2 1 |
|
49 +#define SDL_VIDEO_RENDER_OGL_ES2 0 |
|
50 |
|
51 /* Enable system power support */ |
|
52 -#define SDL_POWER_UIKIT 1 |
|
53 +#define SDL_POWER_UIKIT 0 |
|
54 |
|
55 /* enable iPhone keyboard support */ |
|
56 #define SDL_IPHONE_KEYBOARD 1 |
|
57 |
|
58 +/* enable joystick subsystem */ |
|
59 +#define SDL_JOYSTICK_DISABLED 1 |
|
60 + |
|
61 /* Set max recognized G-force from accelerometer |
|
62 See src/joystick/uikit/SDLUIAccelerationDelegate.m for notes on why this is needed |
|
63 */ |
|
64 diff -r 91c9a69dd2ad src/video/uikit/SDL_uikitopenglview.m |
|
65 --- a/src/video/uikit/SDL_uikitopenglview.m Mon Aug 29 00:27:43 2011 -0400 |
|
66 +++ b/src/video/uikit/SDL_uikitopenglview.m Mon Aug 29 23:56:04 2011 +0200 |
|
67 @@ -123,8 +123,8 @@ |
|
68 |
|
69 // !!! FIXME: use the screen this is on! |
|
70 /* Use the main screen scale (for retina display support) */ |
|
71 - if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)]) |
|
72 - self.contentScaleFactor = [UIScreen mainScreen].scale; |
|
73 + if ([self respondsToSelector:@selector(contentScaleFactor)]) |
|
74 + self.contentScaleFactor = [[UIScreen mainScreen] scale]; |
|
75 |
|
76 self.autoresizingMask = 0; // don't allow autoresize, since we need to do some magic in -(void)updateFrame. |
|
77 } |
|
78 @@ -152,8 +152,8 @@ |
|
79 |
|
80 // !!! FIXME: use the screen this is on! |
|
81 /* Use the main screen scale (for retina display support) */ |
|
82 - if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)]) |
|
83 - self.contentScaleFactor = [UIScreen mainScreen].scale; |
|
84 + if ([self respondsToSelector:@selector(contentScaleFactor)]) |
|
85 + self.contentScaleFactor = [[UIScreen mainScreen] scale]; |
|
86 } |
|
87 |
|
88 - (void)setCurrentContext { |
|
89 diff -r 91c9a69dd2ad src/video/uikit/SDL_uikitvideo.m |
|
90 --- a/src/video/uikit/SDL_uikitvideo.m Mon Aug 29 00:27:43 2011 -0400 |
|
91 +++ b/src/video/uikit/SDL_uikitvideo.m Mon Aug 29 23:56:04 2011 +0200 |
|
92 @@ -245,12 +245,8 @@ |
|
93 const CGRect rect = [uiscreen bounds]; |
|
94 UIKit_AddDisplay(uiscreen, uiscreenmode, (int)rect.size.width, (int)rect.size.height); |
|
95 } else { |
|
96 - const NSArray *screens = [UIScreen screens]; |
|
97 - const NSUInteger screen_count = [screens count]; |
|
98 - NSUInteger i; |
|
99 - for (i = 0; i < screen_count; i++) { |
|
100 + for (UIScreen *uiscreen in [UIScreen screens]) { |
|
101 // the main screen is the first element in the array. |
|
102 - UIScreen *uiscreen = (UIScreen *) [screens objectAtIndex:i]; |
|
103 UIScreenMode *uiscreenmode = [uiscreen currentMode]; |
|
104 const CGSize size = [[uiscreen currentMode] size]; |
|
105 UIKit_AddDisplay(uiscreen, uiscreenmode, (int)size.width, (int)size.height); |
|
106 @@ -286,6 +282,9 @@ |
|
107 UIScreen *uiscreen = (UIScreen *) display->driverdata; |
|
108 [uiscreen release]; |
|
109 display->driverdata = NULL; |
|
110 + UIScreenMode *desktopmode = (UIScreenMode *) display->desktop_mode.driverdata; |
|
111 + [desktopmode release]; |
|
112 + display->desktop_mode.driverdata = NULL; |
|
113 for (j = 0; j < display->num_display_modes; j++) { |
|
114 SDL_DisplayMode *mode = &display->display_modes[j]; |
|
115 UIScreenMode *uimode = (UIScreenMode *) mode->driverdata; |
|
116 diff -r 91c9a69dd2ad src/video/uikit/SDL_uikitviewcontroller.m |
|
117 --- a/src/video/uikit/SDL_uikitviewcontroller.m Mon Aug 29 00:27:43 2011 -0400 |
|
118 +++ b/src/video/uikit/SDL_uikitviewcontroller.m Mon Aug 29 23:56:04 2011 +0200 |
|
119 @@ -138,7 +138,7 @@ |
|
120 frame.origin.x = 0; |
|
121 frame.origin.y = 0; |
|
122 |
|
123 - [uiwindow setFrame:frame]; |
|
124 + [uiwindow setFrame:[[UIScreen mainScreen] bounds]]; |
|
125 [data->view updateFrame]; |
|
126 SDL_SendWindowEvent(self->window, SDL_WINDOWEVENT_RESIZED, w, h); |
|
127 } |