engine: android: quick hack to load libraries on aarch64 until we don't symlinking lib folder

This commit is contained in:
Alibek Omarov 2019-10-11 11:50:21 +03:00
parent e0b8c338a8
commit d3dd671759
1 changed files with 13 additions and 3 deletions

View File

@ -40,9 +40,19 @@ void *ANDROID_LoadLibrary( const char *dllname )
}
// HACKHACK: keep old behaviour for compability
pHandle = dlopen( dllname, RTLD_LAZY );
if( pHandle )
return pHandle;
if( Q_strstr( dllname, "." OS_LIB_EXT ))
{
pHandle = dlopen( dllname, RTLD_LAZY );
if( pHandle )
return pHandle;
}
else
{
Q_snprintf( path, MAX_SYSPATH, "lib%s"POSTFIX"."OS_LIB_EXT, dllname );
pHandle = dlopen( path, RTLD_LAZY );
if( pHandle )
return pHandle;
}
COM_PushLibraryError( dlerror() );