diff options
author | Eugene Sandulenko | 2016-04-01 21:29:29 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-04-01 21:29:29 +0200 |
commit | a743ec2e07ccada0286085ecec54f4d87ed49d44 (patch) | |
tree | dd5ae6b63db99de9b95992a8afabda34cd4ba804 /backends/updates/macosx | |
parent | 14478a65f179318f0e269f10d8bfd77174d73cb1 (diff) | |
download | scummvm-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/macosx')
-rw-r--r-- | backends/updates/macosx/macosx-updates.mm | 13 |
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]; } |