Revert "Fix code for Android"

This reverts commit 7a91fbebd9.
This commit is contained in:
nillerusr
2021-09-02 20:31:11 +03:00
parent b62d2f4f1a
commit 2a490d398c
19 changed files with 18 additions and 405 deletions

View File

@@ -304,26 +304,15 @@ CSysModule *Sys_LoadModule( const char *pModuleName, Sys_Flags flags /* = SYS_NO
#ifdef POSIX
struct stat statBuf;
#ifdef ANDROID
Q_snprintf(szModuleName, sizeof(szModuleName), "lib/lib%s", pModuleName);
#else
Q_snprintf(szModuleName, sizeof(szModuleName), "bin/lib%s", pModuleName);
#endif
bUseLibPrefix |= stat(szModuleName, &statBuf) == 0;
#endif
#ifdef ANDROID
char* szModulePath = "%s/lib/lib%s";
if (!bUseLibPrefix)
szModulePath = "%s/lib/%s";
#else
char* szModulePath = "%s/bin/lib%s";
if (!bUseLibPrefix)
szModulePath = "%s/bin/%s";
#endif
if( bUseLibPrefix )
Q_snprintf( szAbsoluteModuleName, sizeof(szAbsoluteModuleName), "%s/bin/lib%s", szCwd, pModuleName );
else
Q_snprintf( szAbsoluteModuleName, sizeof(szAbsoluteModuleName), "%s/bin/%s", szCwd, pModuleName );
Q_snprintf( szAbsoluteModuleName, sizeof(szAbsoluteModuleName), szModulePath, szCwd, pModuleName );
hDLL = Sys_LoadLibrary( szAbsoluteModuleName, flags );
}