diff --git a/engine/common/host.c b/engine/common/host.c index 577bc913..9aa174b7 100644 --- a/engine/common/host.c +++ b/engine/common/host.c @@ -1017,10 +1017,11 @@ void Host_InitCommon( int argc, char **argv, const char *progname, qboolean bCha else { #if TARGET_OS_IOS - const char *IOS_GetDocsDir(); - Q_strncpy( host.rootdir, IOS_GetDocsDir(), sizeof(host.rootdir) ); + Q_strncpy( host.rootdir, IOS_GetDocsDir(), sizeof( host.rootdir )); +#elif XASH_ANDROID && XASH_SDL + Q_strncpy( host.rootdir, SDL_AndroidGetExternalStoragePath, sizeof( host.rootdir )); #elif XASH_PSVITA - if ( !PSVita_GetBasePath( host.rootdir, sizeof( host.rootdir ) ) ) + if ( !PSVita_GetBasePath( host.rootdir, sizeof( host.rootdir ))) { Sys_Error( "couldn't find xash3d data directory" ); host.rootdir[0] = 0; diff --git a/engine/platform/platform.h b/engine/platform/platform.h index df248038..fefe4802 100644 --- a/engine/platform/platform.h +++ b/engine/platform/platform.h @@ -37,6 +37,11 @@ void Platform_MessageBox( const char *title, const char *message, qboolean paren qboolean Sys_DebuggerPresent( void ); // optional, see Sys_DebugBreak void Platform_SetStatus( const char *status ); +// legacy iOS port functions +#if TARGET_OS_IOS +const char *IOS_GetDocsDir( void ); +#endif // TARGET_OS_IOS + #if XASH_WIN32 || XASH_LINUX #define XASH_PLATFORM_HAVE_STATUS 1 #else