mirror of
https://github.com/love2d/love.git
synced 2026-08-18 03:34:23 +02:00
made a method for setting external save location on android
This commit is contained in:
@@ -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";
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user