aboutsummaryrefslogtreecommitdiff
path: root/backends/updates
diff options
context:
space:
mode:
authorFilippos Karapetis2016-05-23 10:13:17 +0300
committerFilippos Karapetis2016-05-23 10:13:17 +0300
commit8d78615ac8ef532bdcaf144893a1cb7935f22d35 (patch)
tree453a541f3bb9ff46002d39f61fbdde4262a164f7 /backends/updates
parent8b3a08047ca69830128ef703527ea281f49ec53b (diff)
downloadscummvm-rg350-8d78615ac8ef532bdcaf144893a1cb7935f22d35.tar.gz
scummvm-rg350-8d78615ac8ef532bdcaf144893a1cb7935f22d35.tar.bz2
scummvm-rg350-8d78615ac8ef532bdcaf144893a1cb7935f22d35.zip
UPDATES: Fix indentation
Diffstat (limited to 'backends/updates')
-rw-r--r--backends/updates/win32/win32-updates.cpp100
1 files changed, 50 insertions, 50 deletions
diff --git a/backends/updates/win32/win32-updates.cpp b/backends/updates/win32/win32-updates.cpp
index 4a1200b68b..356ff9c903 100644
--- a/backends/updates/win32/win32-updates.cpp
+++ b/backends/updates/win32/win32-updates.cpp
@@ -51,82 +51,82 @@
*
*/
Win32UpdateManager::Win32UpdateManager() {
- const char *appcastUrl = "https://www.scummvm.org/appcasts/macosx/release.xml";
+ const char *appcastUrl = "https://www.scummvm.org/appcasts/macosx/release.xml";
- win_sparkle_set_appcast_url(appcastUrl);
+ win_sparkle_set_appcast_url(appcastUrl);
win_sparkle_init();
-
- if (!ConfMan.hasKey("updates_check")
- || ConfMan.getInt("updates_check") == Common::UpdateManager::kUpdateIntervalNotSupported) {
- setAutomaticallyChecksForUpdates(kUpdateStateDisabled);
- } else {
- setAutomaticallyChecksForUpdates(kUpdateStateEnabled);
- setUpdateCheckInterval(normalizeInterval(ConfMan.getInt("updates_check")));
- }
+
+ if (!ConfMan.hasKey("updates_check")
+ || ConfMan.getInt("updates_check") == Common::UpdateManager::kUpdateIntervalNotSupported) {
+ setAutomaticallyChecksForUpdates(kUpdateStateDisabled);
+ } else {
+ setAutomaticallyChecksForUpdates(kUpdateStateEnabled);
+ setUpdateCheckInterval(normalizeInterval(ConfMan.getInt("updates_check")));
+ }
}
Win32UpdateManager::~Win32UpdateManager() {
- win_sparkle_cleanup();
+ win_sparkle_cleanup();
}
void Win32UpdateManager::checkForUpdates() {
- win_sparkle_check_update_with_ui();
+ win_sparkle_check_update_with_ui();
}
void Win32UpdateManager::setAutomaticallyChecksForUpdates(UpdateManager::UpdateState state) {
- if (state == kUpdateStateNotSupported)
- return;
+ if (state == kUpdateStateNotSupported)
+ return;
- win_sparkle_set_automatic_check_for_updates(state == kUpdateStateEnabled ? 1 : 0);
+ win_sparkle_set_automatic_check_for_updates(state == kUpdateStateEnabled ? 1 : 0);
}
Common::UpdateManager::UpdateState Win32UpdateManager::getAutomaticallyChecksForUpdates() {
- if (win_sparkle_get_automatic_check_for_updates() == 1)
- return kUpdateStateEnabled;
- else
- return kUpdateStateDisabled;
+ if (win_sparkle_get_automatic_check_for_updates() == 1)
+ return kUpdateStateEnabled;
+ else
+ return kUpdateStateDisabled;
}
void Win32UpdateManager::setUpdateCheckInterval(int interval) {
- if (interval == kUpdateIntervalNotSupported)
- return;
+ if (interval == kUpdateIntervalNotSupported)
+ return;
- interval = normalizeInterval(interval);
+ interval = normalizeInterval(interval);
- win_sparkle_set_update_check_interval(interval);
+ win_sparkle_set_update_check_interval(interval);
}
int Win32UpdateManager::getUpdateCheckInterval() {
- // This is kind of a hack but necessary, as the value stored by Sparkle
- // might have been changed outside of ScummVM (in which case we return the
- // default interval of one day)
-
- int updateInterval = win_sparkle_get_update_check_interval();
- switch (updateInterval) {
- case kUpdateIntervalOneDay:
- case kUpdateIntervalOneWeek:
- case kUpdateIntervalOneMonth:
- return updateInterval;
-
- default:
- // Return the default value (one day)
- return kUpdateIntervalOneDay;
- }
+ // This is kind of a hack but necessary, as the value stored by Sparkle
+ // might have been changed outside of ScummVM (in which case we return the
+ // default interval of one day)
+
+ int updateInterval = win_sparkle_get_update_check_interval();
+ switch (updateInterval) {
+ case kUpdateIntervalOneDay:
+ case kUpdateIntervalOneWeek:
+ case kUpdateIntervalOneMonth:
+ return updateInterval;
+
+ default:
+ // Return the default value (one day)
+ return kUpdateIntervalOneDay;
+ }
}
bool Win32UpdateManager::getLastUpdateCheckTimeAndDate(TimeDate &t) {
- time_t updateTime = win_sparkle_get_last_check_time();
- tm *ut = localtime(&updateTime);
-
- t.tm_wday = ut->tm_wday;
- t.tm_year = ut->tm_year;
- t.tm_mon = ut->tm_mon;
- t.tm_mday = ut->tm_mday;
- t.tm_hour = ut->tm_hour;
- t.tm_min = ut->tm_min;
- t.tm_sec = ut->tm_sec;
-
- return true;
+ time_t updateTime = win_sparkle_get_last_check_time();
+ tm *ut = localtime(&updateTime);
+
+ t.tm_wday = ut->tm_wday;
+ t.tm_year = ut->tm_year;
+ t.tm_mon = ut->tm_mon;
+ t.tm_mday = ut->tm_mday;
+ t.tm_hour = ut->tm_hour;
+ t.tm_min = ut->tm_min;
+ t.tm_sec = ut->tm_sec;
+
+ return true;
}
#endif