Hello, right now the way to detect
SDL_UIKit_supports_multiple_displays is failing on older ios versions.
The correct way (as suggested by Apple guidelines) to determine the
ios version is to check if a given method is available for a given
class.
The patch below addresses this (also available here
http://bugzilla.libsdl.org/attachment.cgi?id=722 and part of this bug
http://bugzilla.libsdl.org/show_bug.cgi?id=1266 )
Is it possible to apply this patch to SDL sources?
Thanks
Vittorio
diff -r 9738f2a8eee4 src/video/uikit/SDL_uikitvideo.m
— a/src/video/uikit/SDL_uikitvideo.m Wed Nov 09 02:35:49 2011 -0500
+++ b/src/video/uikit/SDL_uikitvideo.m Sat Nov 19 15:43:20 2011 +0100
@@ -201,10 +201,8 @@
{
_this->gl_config.driver_loaded = 1;
- NSString *reqSysVer = @“3.2”;
- NSString *currSysVer = [[UIDevice currentDevice] systemVersion];
- if ([currSysVer compare:reqSysVer options:NSNumericSearch] !=
NSOrderedAscending) -
SDL_UIKit_supports_multiple_displays = YES;
-
// this tells us whether we are running on ios >= 3.2
-
SDL_UIKit_supports_multiple_displays = [UIScreen
instancesRespondToSelector:@selector(currentMode)];// Add the main screen.
UIScreen *uiscreen = [UIScreen mainScreen];