aboutsummaryrefslogtreecommitdiff
path: root/backends/cloud/onedrive/onedrivestorage.cpp
diff options
context:
space:
mode:
authorAlexander Tkachev2016-06-09 13:49:52 +0600
committerAlexander Tkachev2016-08-24 16:07:55 +0600
commitaf9930482e17f4b55e46707fc017090e4c24a38e (patch)
treee3a5592ff740f821b18693cff86f9fcd44b9de55 /backends/cloud/onedrive/onedrivestorage.cpp
parent4ff1ed5fe9ba86ccf5d7ad72dab8286c70ab7af3 (diff)
downloadscummvm-rg350-af9930482e17f4b55e46707fc017090e4c24a38e.tar.gz
scummvm-rg350-af9930482e17f4b55e46707fc017090e4c24a38e.tar.bz2
scummvm-rg350-af9930482e17f4b55e46707fc017090e4c24a38e.zip
CLOUD: Update CloudManager
It now supports only one storage of each type. Only one Storage could be loaded to the memory as well. Options' Cloud tab now changes the Storage only when user pressed OK button, giving the ability to look through the Storages without actually changing them.
Diffstat (limited to 'backends/cloud/onedrive/onedrivestorage.cpp')
-rw-r--r--backends/cloud/onedrive/onedrivestorage.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/backends/cloud/onedrive/onedrivestorage.cpp b/backends/cloud/onedrive/onedrivestorage.cpp
index c391065396..d73bcdbe34 100644
--- a/backends/cloud/onedrive/onedrivestorage.cpp
+++ b/backends/cloud/onedrive/onedrivestorage.cpp
@@ -115,14 +115,14 @@ void OneDriveStorage::codeFlowComplete(BoolResponse response) {
return;
}
- CloudMan.addStorage(this);
ConfMan.removeKey("onedrive_code", "cloud");
+ CloudMan.replaceStorage(this, kStorageOneDriveId);
+ ConfMan.flushToDisk();
debug("Done! You can use OneDrive now! Look:");
CloudMan.syncSaves();
}
-void OneDriveStorage::saveConfig(Common::String keyPrefix) {
- ConfMan.set(keyPrefix + "type", "OneDrive", "cloud");
+void OneDriveStorage::saveConfig(Common::String keyPrefix) {
ConfMan.set(keyPrefix + "access_token", _token, "cloud");
ConfMan.set(keyPrefix + "user_id", _uid, "cloud");
ConfMan.set(keyPrefix + "refresh_token", _refreshToken, "cloud");