BACKENDS: Fix compilation with SDL_Net enabled and cloud support disabled

This commit is contained in:
Cameron Cawley 2019-04-02 16:53:56 +01:00 committed by Matan Bareket
parent 364fb12e83
commit 27e6a28e4e
2 changed files with 6 additions and 5 deletions

View File

@ -29,8 +29,9 @@
#if defined(USE_CLOUD) && defined(USE_LIBCURL)
#include "backends/cloud/cloudmanager.h"
#include "common/file.h"
#endif
#include "common/file.h"
#include "common/system.h"
#if !defined(DISABLE_DEFAULT_SAVEFILEMANAGER)
@ -369,6 +370,8 @@ void DefaultSaveFileManager::saveTimestamps(Common::HashMap<Common::String, uint
f.close();
}
#endif // ifdef USE_LIBCURL
Common::String DefaultSaveFileManager::concatWithSavesPath(Common::String name) {
DefaultSaveFileManager *manager = dynamic_cast<DefaultSaveFileManager *>(g_system->getSavefileManager());
Common::String path = (manager ? manager->getSavePath() : ConfMan.get("savepath"));
@ -385,6 +388,4 @@ Common::String DefaultSaveFileManager::concatWithSavesPath(Common::String name)
return path + '/' + name;
}
#endif // ifdef USE_LIBCURL
#endif // !defined(DISABLE_DEFAULT_SAVEFILEMANAGER)

View File

@ -52,10 +52,10 @@ public:
static Common::HashMap<Common::String, uint32> loadTimestamps();
static void saveTimestamps(Common::HashMap<Common::String, uint32> &timestamps);
static Common::String concatWithSavesPath(Common::String name);
#endif
static Common::String concatWithSavesPath(Common::String name);
protected:
/**
* Get the path to the savegame directory.