actually the those if(...); weren't supposed to be if statements in the first place, since the result is always true at that point of code anyway.
diff -r 50560ca58f80 Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj
--- a/Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj Mon Oct 24 23:18:53 2011 -0400
+++ b/Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj Tue Oct 25 22:13:19 2011 +0200
@@ -1596,9 +1596,12 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_DEBUGGING_SYMBOLS = full;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_THUMB_SUPPORT = NO;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = NO;
- IPHONEOS_DEPLOYMENT_TARGET = 3.1.3;
+ IPHONEOS_DEPLOYMENT_TARGET = 3.0;
ONLY_ACTIVE_ARCH = NO;
PREBINDING = NO;
SDKROOT = iphoneos;
@@ -1613,9 +1616,12 @@
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
GCC_C_LANGUAGE_STANDARD = c99;
+ GCC_FAST_MATH = YES;
+ GCC_THUMB_SUPPORT = NO;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = NO;
- IPHONEOS_DEPLOYMENT_TARGET = 3.1.3;
+ IPHONEOS_DEPLOYMENT_TARGET = 3.0;
PREBINDING = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
diff -r 50560ca58f80 include/SDL_config_iphoneos.h
--- a/include/SDL_config_iphoneos.h Mon Oct 24 23:18:53 2011 -0400
+++ b/include/SDL_config_iphoneos.h Tue Oct 25 22:13:19 2011 +0200
@@ -106,7 +106,7 @@
/* enable iPhone version of Core Audio driver */
#define SDL_AUDIO_DRIVER_COREAUDIO 1
/* Enable the dummy audio driver (src/audio/dummy/\*.c) */
-#define SDL_AUDIO_DRIVER_DUMMY 1
+#define SDL_AUDIO_DRIVER_DUMMY 0
/* Enable the stub haptic driver (src/haptic/dummy/\*.c) */
#define SDL_HAPTIC_DISABLED 1
@@ -132,16 +132,16 @@
/* enable OpenGL ES */
#define SDL_VIDEO_OPENGL_ES 1
#define SDL_VIDEO_RENDER_OGL_ES 1
-#define SDL_VIDEO_RENDER_OGL_ES2 1
+#define SDL_VIDEO_RENDER_OGL_ES2 0
/* Enable system power support */
-#define SDL_POWER_UIKIT 1
+#define SDL_POWER_UIKIT 0
/* enable iPhone keyboard support */
#define SDL_IPHONE_KEYBOARD 1
/* enable joystick subsystem */
-#define SDL_JOYSTICK_DISABLED 0
+#define SDL_JOYSTICK_DISABLED 1
/* Set max recognized G-force from accelerometer
See src/joystick/uikit/SDLUIAccelerationDelegate.m for notes on why this is needed
diff -r 50560ca58f80 src/video/uikit/SDL_uikitopenglview.m
--- a/src/video/uikit/SDL_uikitopenglview.m Mon Oct 24 23:18:53 2011 -0400
+++ b/src/video/uikit/SDL_uikitopenglview.m Tue Oct 25 22:13:19 2011 +0200
@@ -114,8 +114,8 @@
// !!! FIXME: use the screen this is on!
/* Use the main screen scale (for retina display support) */
- if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)])
- self.contentScaleFactor = [UIScreen mainScreen].scale;
+ if ([self respondsToSelector:@selector(contentScaleFactor)])
+ self.contentScaleFactor = [[UIScreen mainScreen] scale];
self.autoresizingMask = 0; // don't allow autoresize, since we need to do some magic in -(void)updateFrame.
}
@@ -144,8 +144,8 @@
// !!! FIXME: use the screen this is on!
/* Use the main screen scale (for retina display support) */
- if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)])
- self.contentScaleFactor = [UIScreen mainScreen].scale;
+ if ([self respondsToSelector:@selector(contentScaleFactor)])
+ self.contentScaleFactor = [[UIScreen mainScreen] scale];
}
- (void)setCurrentContext
diff -r 50560ca58f80 src/video/uikit/SDL_uikitviewcontroller.m
--- a/src/video/uikit/SDL_uikitviewcontroller.m Mon Oct 24 23:18:53 2011 -0400
+++ b/src/video/uikit/SDL_uikitviewcontroller.m Tue Oct 25 22:13:19 2011 +0200
@@ -145,7 +145,7 @@
frame.origin.x = 0;
frame.origin.y = 0;
- [uiwindow setFrame:frame];
+ [uiwindow setFrame:[[UIScreen mainScreen] bounds]];
[data->view updateFrame];
SDL_SendWindowEvent(self->window, SDL_WINDOWEVENT_RESIZED, w, h);
}