diff options
author | Eugene Sandulenko | 2016-03-31 15:34:50 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-03-31 15:34:50 +0200 |
commit | 33dc840d2f580ac9bd9d4634279294621692bafd (patch) | |
tree | bd0441ff4589424bbb7ea21c9d8891d2a4f4e216 | |
parent | ed3f936287c6dc160587e67b7b492f183ddc905d (diff) | |
download | scummvm-rg350-33dc840d2f580ac9bd9d4634279294621692bafd.tar.gz scummvm-rg350-33dc840d2f580ac9bd9d4634279294621692bafd.tar.bz2 scummvm-rg350-33dc840d2f580ac9bd9d4634279294621692bafd.zip |
UPDATES: Normalize update intervals at setting
-rw-r--r-- | backends/updates/macosx/macosx-updates.mm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/backends/updates/macosx/macosx-updates.mm b/backends/updates/macosx/macosx-updates.mm index 6f99e71ccf..6c7ed03b52 100644 --- a/backends/updates/macosx/macosx-updates.mm +++ b/backends/updates/macosx/macosx-updates.mm @@ -110,6 +110,17 @@ 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; + [sparkleUpdater setUpdateCheckInterval:(NSTimeInterval)interval]; } |