aboutsummaryrefslogtreecommitdiff
path: root/backends/updates
diff options
context:
space:
mode:
authorEugene Sandulenko2016-04-01 21:29:29 +0200
committerEugene Sandulenko2016-04-01 21:29:29 +0200
commita743ec2e07ccada0286085ecec54f4d87ed49d44 (patch)
treedd5ae6b63db99de9b95992a8afabda34cd4ba804 /backends/updates
parent14478a65f179318f0e269f10d8bfd77174d73cb1 (diff)
downloadscummvm-rg350-a743ec2e07ccada0286085ecec54f4d87ed49d44.tar.gz
scummvm-rg350-a743ec2e07ccada0286085ecec54f4d87ed49d44.tar.bz2
scummvm-rg350-a743ec2e07ccada0286085ecec54f4d87ed49d44.zip
UPDATES: Implement and use method for normalizing interval value to accepted values
Diffstat (limited to 'backends/updates')
-rw-r--r--backends/updates/macosx/macosx-updates.mm13
1 files changed, 2 insertions, 11 deletions
diff --git a/backends/updates/macosx/macosx-updates.mm b/backends/updates/macosx/macosx-updates.mm
index 6c7ed03b52..fc967f8fec 100644
--- a/backends/updates/macosx/macosx-updates.mm
+++ b/backends/updates/macosx/macosx-updates.mm
@@ -80,7 +80,7 @@ MacOSXUpdateManager::MacOSXUpdateManager() {
setAutomaticallyChecksForUpdates(kUpdateStateDisabled);
} else {
setAutomaticallyChecksForUpdates(kUpdateStateEnabled);
- setUpdateCheckInterval(ConfMan.getInt("updates_check"));
+ setUpdateCheckInterval(normalizeInterval(ConfMan.getInt("updates_check")));
}
}
@@ -110,16 +110,7 @@ void MacOSXUpdateManager::setUpdateCheckInterval(int interval) {
if (interval == kUpdateIntervalNotSupported)
return;
- const int *vals = getUpdateIntervals();
-
- while (*vals != -1) {
- if (interval == *vals)
- break;
- vals++;
- }
-
- if (*vals == -1)
- interval = kUpdateIntervalOneDay;
+ interval = normalizeInterval(interval);
[sparkleUpdater setUpdateCheckInterval:(NSTimeInterval)interval];
}