removed support for native resolution stream

This commit is contained in:
Diego Waxemberg 2015-10-16 23:38:14 -07:00
parent 74a0c5b1cd
commit 3b1462af22
3 changed files with 5 additions and 26 deletions

View File

@ -33,7 +33,7 @@ static NSString* bitrateFormat = @"Bitrate: %.1f Mbps";
} else if ([currentSettings.height integerValue] == 1080) {
resolution = 1;
} else {
resolution = 2;
resolution = 0;
}
NSInteger onscreenControls = [currentSettings.onscreenControls integerValue];
@ -58,27 +58,8 @@ static NSString* bitrateFormat = @"Bitrate: %.1f Mbps";
- (void) saveSettings {
DataManager* dataMan = [[DataManager alloc] init];
NSInteger framerate = [self.framerateSelector selectedSegmentIndex] == 0 ? 30 : 60;
NSInteger height;
NSInteger width;
if ([self.resolutionSelector selectedSegmentIndex] == 2) {
// Get screen native resolution
height = [UIScreen mainScreen].bounds.size.height * [UIScreen mainScreen].scale;
width = [UIScreen mainScreen].bounds.size.width * [UIScreen mainScreen].scale;
// Check if this setting differs from the previous value
Settings* oldSettings = [dataMan retrieveSettings];
if ([oldSettings.width intValue] != width || [oldSettings.height intValue] != height)
{
UIAlertController *alertResolution = [UIAlertController alertControllerWithTitle:@"Native resolution" message:[NSString stringWithFormat:@"For best results, select the following resolution in the game settings: %lix%li", (long)width, (long)height] preferredStyle:UIAlertControllerStyleAlert];
[alertResolution addAction:[UIAlertAction actionWithTitle:@"Ok" style:UIAlertActionStyleCancel handler:nil]];
[self presentViewController:alertResolution animated:YES completion:nil];
}
}
else
{
height = [self.resolutionSelector selectedSegmentIndex] == 0 ? 720 : 1080;
width = height == 720 ? 1280 : 1920;
}
NSInteger height = [self.resolutionSelector selectedSegmentIndex] == 0 ? 720 : 1080;
NSInteger width = height == 720 ? 1280 : 1920;
NSInteger onscreenControls = [self.onscreenControlSelector selectedSegmentIndex];
[dataMan saveSettingsWithBitrate:_bitrate framerate:framerate height:height width:width onscreenControls:onscreenControls];
}

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8191" systemVersion="15A279b" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" initialViewController="EVd-wq-ego">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8191" systemVersion="15B38b" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" initialViewController="EVd-wq-ego">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
@ -120,7 +120,6 @@
<segments>
<segment title="720p"/>
<segment title="1080p"/>
<segment title="Native"/>
</segments>
<color key="tintColor" red="0.72941176470000002" green="0.69411764710000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</segmentedControl>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8191" systemVersion="15A279b" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="DL0-L5-LOv">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8191" systemVersion="15B38b" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="DL0-L5-LOv">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
@ -148,7 +148,6 @@
<segments>
<segment title="720p"/>
<segment title="1080p"/>
<segment title="Native"/>
</segments>
<color key="tintColor" red="0.72941176470588232" green="0.69411764705882351" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</segmentedControl>