diff options
Diffstat (limited to 'backends/cloud/cloudmanager.cpp')
-rw-r--r-- | backends/cloud/cloudmanager.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/backends/cloud/cloudmanager.cpp b/backends/cloud/cloudmanager.cpp index a3e9856455..38089db0e9 100644 --- a/backends/cloud/cloudmanager.cpp +++ b/backends/cloud/cloudmanager.cpp @@ -159,7 +159,6 @@ void CloudManager::replaceStorage(Storage *storage, uint32 index) { //do what should be done on first Storage connect if (_activeStorage) { _activeStorage->info(nullptr, nullptr); //automatically calls setStorageUsername() - _activeStorage->syncSaves(nullptr, nullptr); } } @@ -365,6 +364,21 @@ bool CloudManager::canSyncFilename(const Common::String &filename) const { return true; } +bool CloudManager::isStorageEnabled() const { + Storage *storage = getCurrentStorage(); + if (storage) + return storage->isEnabled(); + return false; +} + +void CloudManager::enableStorage() { + Storage *storage = getCurrentStorage(); + if (storage) { + storage->enable(); + save(); + } +} + SavesSyncRequest *CloudManager::syncSaves(Storage::BoolCallback callback, Networking::ErrorCallback errorCallback) { Storage *storage = getCurrentStorage(); if (storage) { |