浏览代码

Fixed filesystem writing on iOS.

Alex Szpakowski 10 年之前
父节点
当前提交
3199482c3b
共有 1 个文件被更改,包括 6 次插入0 次删除
  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;
 }