Error(ERR_DEBUG, "::: SDL_AndroidGetExternalStoragePath() == '%s'",
SDL_AndroidGetExternalStoragePath());
Error(ERR_DEBUG, "::: SDL_AndroidGetExternalStorageState() == '%s'",
- (SDL_AndroidGetExternalStorageState() ==
- SDL_ANDROID_EXTERNAL_STORAGE_READ ? "read" :
- SDL_AndroidGetExternalStorageState() ==
- SDL_ANDROID_EXTERNAL_STORAGE_WRITE ? "write" : "not available"));
+ (SDL_AndroidGetExternalStorageState() &
+ SDL_ANDROID_EXTERNAL_STORAGE_WRITE ? "writable" :
+ SDL_AndroidGetExternalStorageState() &
+ SDL_ANDROID_EXTERNAL_STORAGE_READ ? "readable" : "not available"));
#endif
#endif
}
#if defined(PLATFORM_ANDROID)
if (user_game_data_dir == NULL)
- user_game_data_dir = (char *)SDL_AndroidGetInternalStoragePath();
+ user_game_data_dir = (char *)(SDL_AndroidGetExternalStorageState() &
+ SDL_ANDROID_EXTERNAL_STORAGE_WRITE ?
+ SDL_AndroidGetExternalStoragePath() :
+ SDL_AndroidGetInternalStoragePath());
#else
if (user_game_data_dir == NULL)
user_game_data_dir = getPath2(getPersonalDataDir(),