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

Commit

Permalink
Check for selectors UIScreen responds to, not the base system version.
Browse files Browse the repository at this point in the history
Thanks to Vittorio Giovara for the patch!
  • Loading branch information
icculus committed Nov 20, 2011
1 parent 7925352 commit 4262a04
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/video/uikit/SDL_uikitvideo.m
Expand Up @@ -201,10 +201,8 @@ static void UIKit_DeleteDevice(SDL_VideoDevice * device)
{
_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];
Expand Down

0 comments on commit 4262a04

Please sign in to comment.