Mercurial > sdl-ios-xcode
changeset 4445:06becafcac89
Test for system version in the Apple Recommended way.
(a similar test is output by Xcode for the iPhone View Application template).
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Sat, 01 May 2010 13:50:56 -0400 |
parents | 42e1092225f9 |
children | 8b03a20b320f |
files | src/video/uikit/SDL_uikitvideo.m |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/video/uikit/SDL_uikitvideo.m Fri Apr 30 00:39:31 2010 -0400 +++ b/src/video/uikit/SDL_uikitvideo.m Sat May 01 13:50:56 2010 -0400 @@ -184,8 +184,10 @@ { _this->gl_config.driver_loaded = 1; - const float version = [[[UIDevice currentDevice] systemVersion] floatValue]; - supports_multiple_displays = (version >= 3.2f); + NSString *reqSysVer = @"3.2"; + NSString *currSysVer = [[UIDevice currentDevice] systemVersion]; + if ([currSysVer compare:reqSysVer options:NSNumericSearch] != NSOrderedAscending) + supports_multiple_displays = YES; // If this is iPhoneOS < 3.2, all devices are one screen, 320x480 pixels. // The iPad added both a larger main screen and the ability to use