UIScreen.bounds.size doesn't give the real resolution

We need to multiply it by the UIScreen.scale
This commit is contained in:
Samuel Bétrisey 2014-12-27 03:21:32 +01:00
parent 5968d511b2
commit 0ee9b87742

View File

@ -48,8 +48,8 @@ static NSString* bitrateFormat = @"Bitrate: %d kbps";
NSInteger width; NSInteger width;
if ([self.resolutionSelector selectedSegmentIndex] == 2) { if ([self.resolutionSelector selectedSegmentIndex] == 2) {
// Get screen native resolution // Get screen native resolution
height = [UIScreen mainScreen].bounds.size.height; height = [UIScreen mainScreen].bounds.size.height * [UIScreen mainScreen].scale;
width = [UIScreen mainScreen].bounds.size.width; width = [UIScreen mainScreen].bounds.size.width * [UIScreen mainScreen].scale;
UIAlertView *alertResolution = [[UIAlertView alloc] initWithTitle:@"Native resolution" UIAlertView *alertResolution = [[UIAlertView alloc] initWithTitle:@"Native resolution"
message:[NSString stringWithFormat:@"You must select the following resolution in the game settings : %lix%li", (long)width, (long)height] message:[NSString stringWithFormat:@"You must select the following resolution in the game settings : %lix%li", (long)width, (long)height]