From 6015c38d17e73d185294335a4482352f5f9ecf6b Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Mon, 28 Sep 2015 22:50:54 -0700 Subject: [PATCH] Only display the native resolution dialog if the user has just chosen native resolution. Make the dialog a little nicer too. --- Limelight/ViewControllers/SettingsViewController.m | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Limelight/ViewControllers/SettingsViewController.m b/Limelight/ViewControllers/SettingsViewController.m index 57de983..cb2bf30 100644 --- a/Limelight/ViewControllers/SettingsViewController.m +++ b/Limelight/ViewControllers/SettingsViewController.m @@ -65,9 +65,14 @@ static NSString* bitrateFormat = @"Bitrate: %.1f Mbps"; height = [UIScreen mainScreen].bounds.size.height * [UIScreen mainScreen].scale; width = [UIScreen mainScreen].bounds.size.width * [UIScreen mainScreen].scale; - UIAlertController *alertResolution = [UIAlertController alertControllerWithTitle:@"Native resolution" message:[NSString stringWithFormat:@"You must 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]; + // 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 {