diff options
author | Alexander Tkachev | 2016-07-05 15:05:30 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | 3da38ca60b65d3f1bd67b049f3c4b2a90a4d6a19 (patch) | |
tree | 6c5d1175fb367bc6e73a86d1ff73a39ca467bc95 /backends | |
parent | 211d9ed5f67712f5e0a1b23e7b3fb492b5256f89 (diff) | |
download | scummvm-rg350-3da38ca60b65d3f1bd67b049f3c4b2a90a4d6a19.tar.gz scummvm-rg350-3da38ca60b65d3f1bd67b049f3c4b2a90a4d6a19.tar.bz2 scummvm-rg350-3da38ca60b65d3f1bd67b049f3c4b2a90a4d6a19.zip |
CLOUD: Replace USE_CLOUD with USE_LIBCURL
In most cases that's the right one to check. USE_CLOUD is defined when
either USE_LIBCURL or USE_SDL_NET are, which means if there is no curl,
USE_CLOUD still could be defined and linking errors would appear.
Diffstat (limited to 'backends')
-rw-r--r-- | backends/module.mk | 8 | ||||
-rw-r--r-- | backends/saves/default/default-saves.cpp | 12 | ||||
-rw-r--r-- | backends/saves/default/default-saves.h | 2 | ||||
-rw-r--r-- | backends/saves/savefile.cpp | 4 |
4 files changed, 11 insertions, 15 deletions
diff --git a/backends/module.mk b/backends/module.mk index ecdca2e0a7..ece3128d74 100644 --- a/backends/module.mk +++ b/backends/module.mk @@ -19,7 +19,7 @@ MODULE_OBJS := \ saves/default/default-saves.o \ timer/default/default-timer.o -ifdef USE_CLOUD +ifdef USE_LIBCURL MODULE_OBJS += \ cloud/cloudmanager.o \ cloud/iso8601.o \ @@ -45,11 +45,7 @@ MODULE_OBJS += \ cloud/onedrive/onedrivecreatedirectoryrequest.o \ cloud/onedrive/onedrivetokenrefresher.o \ cloud/onedrive/onedrivelistdirectoryrequest.o \ - cloud/onedrive/onedriveuploadrequest.o -endif - -ifdef USE_LIBCURL -MODULE_OBJS += \ + cloud/onedrive/onedriveuploadrequest.o \ networking/curl/connectionmanager.o \ networking/curl/networkreadstream.o \ networking/curl/cloudicon.o \ diff --git a/backends/saves/default/default-saves.cpp b/backends/saves/default/default-saves.cpp index 06d4047a4e..7f96868934 100644 --- a/backends/saves/default/default-saves.cpp +++ b/backends/saves/default/default-saves.cpp @@ -27,7 +27,7 @@ #include "common/scummsys.h" -#ifdef USE_CLOUD +#ifdef USE_LIBCURL #include "backends/cloud/cloudmanager.h" #include "common/file.h" #endif @@ -47,7 +47,7 @@ #include <errno.h> // for removeSavefile() #endif -#ifdef USE_CLOUD +#ifdef USE_LIBCURL const char *DefaultSaveFileManager::TIMESTAMPS_FILENAME = "timestamps"; #endif @@ -147,7 +147,7 @@ Common::OutSaveFile *DefaultSaveFileManager::openForSaving(const Common::String } } -#ifdef USE_CLOUD +#ifdef USE_LIBCURL // Update file's timestamp Common::HashMap<Common::String, uint32> timestamps = loadTimestamps(); timestamps[filename] = INVALID_TIMESTAMP; @@ -237,7 +237,7 @@ void DefaultSaveFileManager::assureCached(const Common::String &savePathName) { // Check that path exists and is usable. checkPath(Common::FSNode(savePathName)); -#ifdef USE_CLOUD +#ifdef USE_LIBCURL Common::Array<Common::String> files = CloudMan.getSyncingFiles(); //returns empty array if not syncing if (!files.empty()) updateSavefilesList(files); //makes this cache invalid else _lockedFiles = files; @@ -278,7 +278,7 @@ void DefaultSaveFileManager::assureCached(const Common::String &savePathName) { _cachedDirectory = savePathName; } -#ifdef USE_CLOUD +#ifdef USE_LIBCURL Common::HashMap<Common::String, uint32> DefaultSaveFileManager::loadTimestamps() { Common::HashMap<Common::String, uint32> timestamps; @@ -374,6 +374,6 @@ Common::String DefaultSaveFileManager::concatWithSavesPath(Common::String name) return path + '/' + name; } -#endif // ifdef USE_CLOUD +#endif // ifdef USE_LIBCURL #endif // !defined(DISABLE_DEFAULT_SAVEFILEMANAGER) diff --git a/backends/saves/default/default-saves.h b/backends/saves/default/default-saves.h index e9edfb1f36..f2453810bf 100644 --- a/backends/saves/default/default-saves.h +++ b/backends/saves/default/default-saves.h @@ -45,7 +45,7 @@ public: virtual Common::OutSaveFile *openForSaving(const Common::String &filename, bool compress = true); virtual bool removeSavefile(const Common::String &filename); -#ifdef USE_CLOUD +#ifdef USE_LIBCURL static const uint32 INVALID_TIMESTAMP = UINT_MAX; static const char *TIMESTAMPS_FILENAME; diff --git a/backends/saves/savefile.cpp b/backends/saves/savefile.cpp index 1f007ca713..5e983472da 100644 --- a/backends/saves/savefile.cpp +++ b/backends/saves/savefile.cpp @@ -23,7 +23,7 @@ #include "common/util.h" #include "common/savefile.h" #include "common/str.h" -#ifdef USE_CLOUD +#ifdef USE_LIBCURL #include "backends/cloud/cloudmanager.h" #endif @@ -39,7 +39,7 @@ void OutSaveFile::clearErr() { _wrapped->clearErr(); } void OutSaveFile::finalize() { _wrapped->finalize(); -#ifdef USE_CLOUD +#ifdef USE_LIBCURL CloudMan.syncSaves(); #endif } |