fix build with clang, fix saverestore again, android mod launcher support

This commit is contained in:
nillerusr
2022-01-19 18:59:42 +03:00
parent 94fb7d4c00
commit 0fb75b41fd
142 changed files with 59 additions and 45506 deletions
+11 -2
View File
@@ -308,12 +308,20 @@ CSysModule *Sys_LoadModule( const char *pModuleName, Sys_Flags flags /* = SYS_NO
struct stat statBuf;
char *dataPath = getenv("APP_DATA_PATH");
char *modLibPath = getenv("APP_MOD_LIB");
if( modLibPath && *modLibPath ) // first load library from mod launcher
{
Q_snprintf(szAbsoluteModuleName, sizeof(szAbsoluteModuleName), "%s/lib%s", modLibPath, pModuleName);
if( stat(szAbsoluteModuleName, &statBuf) != 0 )
Q_snprintf(szAbsoluteModuleName, sizeof(szAbsoluteModuleName), "%s/%s", modLibPath, pModuleName);
hDLL = Sys_LoadLibrary(szAbsoluteModuleName, flags);
}
Q_snprintf(szAbsoluteModuleName, sizeof(szAbsoluteModuleName), "%s/lib/lib%s", dataPath ,pModuleName);
if( stat(szAbsoluteModuleName, &statBuf) != 0 )
Q_snprintf(szAbsoluteModuleName, sizeof(szAbsoluteModuleName), "%s/lib/%s", dataPath ,pModuleName);
#else
#ifdef POSIX
struct stat statBuf;
Q_snprintf(szModuleName, sizeof(szModuleName), "bin/lib%s", pModuleName);
@@ -326,7 +334,8 @@ CSysModule *Sys_LoadModule( const char *pModuleName, Sys_Flags flags /* = SYS_NO
#endif // ANDROID
Msg("LoadLibrary: pModule: %s, path: %s\n", pModuleName, szAbsoluteModuleName);
hDLL = Sys_LoadLibrary( szAbsoluteModuleName, flags );
if( !hDLL )
hDLL = Sys_LoadLibrary( szAbsoluteModuleName, flags );
}
else
Msg("LoadLibrary: path: %s\n", pModuleName);
+1
View File
@@ -79,6 +79,7 @@
#include "xbox/xbox_win32stubs.h"
#endif
#include "tier0/memdbgon.h"
#include "iconv.h"
static int FastToLower( char c )
{