Browse Source

Fixed filesystem writing on iOS.

Alex Szpakowski 10 years ago
parent
commit
3199482c3b
1 changed files with 6 additions and 0 deletions
  1. 6 0
      src/modules/filesystem/physfs/Filesystem.cpp

+ 6 - 0
src/modules/filesystem/physfs/Filesystem.cpp

@@ -410,7 +410,13 @@ const char *Filesystem::getWorkingDirectory()
 
 std::string Filesystem::getUserDirectory()
 {
+#ifdef LOVE_IOS
+	// PHYSFS_getUserDir doesn't give exactly the path we want on iOS.
+	static std::string userDir = normalize(love::ios::getHomeDirectory());
+#else
 	static std::string userDir = normalize(PHYSFS_getUserDir());
+#endif
+
 	return userDir;
 }