Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Test for system version in the Apple Recommended way.
Browse files Browse the repository at this point in the history
(a similar test is output by Xcode for the iPhone View Application template).
  • Loading branch information
icculus committed May 1, 2010
1 parent 34faead commit 5609d04
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/video/uikit/SDL_uikitvideo.m
Expand Up @@ -184,8 +184,10 @@ static void UIKit_DeleteDevice(SDL_VideoDevice * device)
{
_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
Expand Down

0 comments on commit 5609d04

Please sign in to comment.