Fix Android crash in System directory check (resolve openfl/openfl#1219)

This commit is contained in:
Joshua Granick
2016-08-05 11:30:48 -07:00
parent bd7ddafa31
commit 7b22fd1cc4

View File

@@ -117,7 +117,7 @@ namespace lime {
SHGetFolderPath (NULL, CSIDL_DESKTOPDIRECTORY, NULL, SHGFP_TYPE_CURRENT, result);
return WIN_StringToUTF8 (result);
#else
#elseif !defined (ANDROID)
std::string result = std::string (getenv ("HOME")) + std::string ("/Desktop");
return result.c_str ();
@@ -142,6 +142,10 @@ namespace lime {
SHGetFolderPath (NULL, CSIDL_MYDOCUMENTS, NULL, SHGFP_TYPE_CURRENT, result);
return WIN_StringToUTF8 (result);
#elif defined (ANDROID)
return "/mnt/sdcard/Documents";
#else
std::string result = std::string (getenv ("HOME")) + std::string ("/Documents");
@@ -204,6 +208,10 @@ namespace lime {
SHGetFolderPath (NULL, CSIDL_PROFILE, NULL, SHGFP_TYPE_CURRENT, result);
return WIN_StringToUTF8 (result);
#elif defined (ANDROID)
return "/mnt/sdcard";
#else
std::string result = getenv ("HOME");