Fix Android crash in System directory check (resolve openfl/openfl#1219)
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user