made a method for setting external save location on android

This commit is contained in:
BobbyJones
2016-01-02 18:52:25 -05:00
parent c283e36126
commit 3aa51763e2
7 changed files with 63 additions and 17 deletions
+4 -4
View File
@@ -144,7 +144,7 @@ bool Filesystem::isFused() const
return fused;
}
bool Filesystem::setIdentity(const char *ident, bool appendToPath, bool internalStorage)
bool Filesystem::setIdentity(const char *ident, bool appendToPath)
{
if (!PHYSFS_isInit())
return false;
@@ -171,10 +171,10 @@ bool Filesystem::setIdentity(const char *ident, bool appendToPath, bool internal
save_identity = "unnamed";
std::string storage_path;
if (internalStorage)
storage_path = SDL_AndroidGetInternalStoragePath();
else
if (isAndroidSaveExternal())
storage_path = SDL_AndroidGetExternalStoragePath();
else
storage_path = SDL_AndroidGetInternalStoragePath();
std::string save_directory = storage_path + "/save";
+1 -1
View File
@@ -52,7 +52,7 @@ public:
bool setupWriteDirectory();
bool setIdentity(const char *ident, bool appendToPath = false, bool internalStorage = false);
bool setIdentity(const char *ident, bool appendToPath = false);
const char *getIdentity() const;
bool setSource(const char *source);