Mercurial > sdl-ios-xcode
comparison src/video/uikit/SDL_uikitvideo.m @ 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 | c598e440c87c |
children | 8b03a20b320f |
comparison
equal
deleted
inserted
replaced
4444:42e1092225f9 | 4445:06becafcac89 |
---|---|
182 int | 182 int |
183 UIKit_VideoInit(_THIS) | 183 UIKit_VideoInit(_THIS) |
184 { | 184 { |
185 _this->gl_config.driver_loaded = 1; | 185 _this->gl_config.driver_loaded = 1; |
186 | 186 |
187 const float version = [[[UIDevice currentDevice] systemVersion] floatValue]; | 187 NSString *reqSysVer = @"3.2"; |
188 supports_multiple_displays = (version >= 3.2f); | 188 NSString *currSysVer = [[UIDevice currentDevice] systemVersion]; |
189 if ([currSysVer compare:reqSysVer options:NSNumericSearch] != NSOrderedAscending) | |
190 supports_multiple_displays = YES; | |
189 | 191 |
190 // If this is iPhoneOS < 3.2, all devices are one screen, 320x480 pixels. | 192 // If this is iPhoneOS < 3.2, all devices are one screen, 320x480 pixels. |
191 // The iPad added both a larger main screen and the ability to use | 193 // The iPad added both a larger main screen and the ability to use |
192 // external displays. | 194 // external displays. |
193 if (!supports_multiple_displays) { | 195 if (!supports_multiple_displays) { |