Test for system version in the Apple Recommended way.
authorRyan C. Gordon
Sat, 01 May 2010 13:50:56 -0400
changeset 444506becafcac89
parent 4444 42e1092225f9
child 4446 8b03a20b320f
Test for system version in the Apple Recommended way.

(a similar test is output by Xcode for the iPhone View Application template).
src/video/uikit/SDL_uikitvideo.m
     1.1 --- a/src/video/uikit/SDL_uikitvideo.m	Fri Apr 30 00:39:31 2010 -0400
     1.2 +++ b/src/video/uikit/SDL_uikitvideo.m	Sat May 01 13:50:56 2010 -0400
     1.3 @@ -184,8 +184,10 @@
     1.4  {
     1.5      _this->gl_config.driver_loaded = 1;
     1.6  
     1.7 -    const float version = [[[UIDevice currentDevice] systemVersion] floatValue];
     1.8 -    supports_multiple_displays = (version >= 3.2f);
     1.9 +    NSString *reqSysVer = @"3.2";
    1.10 +    NSString *currSysVer = [[UIDevice currentDevice] systemVersion];
    1.11 +    if ([currSysVer compare:reqSysVer options:NSNumericSearch] != NSOrderedAscending)
    1.12 +        supports_multiple_displays = YES;
    1.13  
    1.14      // If this is iPhoneOS < 3.2, all devices are one screen, 320x480 pixels.
    1.15      //  The iPad added both a larger main screen and the ability to use