mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-30 08:44:31 +00:00
engine: platform: emscripten: replace va function calls.
This commit is contained in:
parent
af5c74981b
commit
daaaa324bd
@ -24,14 +24,15 @@ void *EMSCRIPTEN_LoadLibrary( const char *dllname )
|
|||||||
void *pHandle = NULL;
|
void *pHandle = NULL;
|
||||||
|
|
||||||
#ifdef EMSCRIPTEN_LIB_FS
|
#ifdef EMSCRIPTEN_LIB_FS
|
||||||
char path[MAX_SYSPATH];
|
char path[MAX_SYSPATH], buf[MAX_VA_STRING];
|
||||||
string prefix;
|
string prefix;
|
||||||
Q_strcpy(prefix, getenv( "LIBRARY_PREFIX" ) );
|
Q_strcpy(prefix, getenv( "LIBRARY_PREFIX" ) );
|
||||||
Q_snprintf( path, MAX_SYSPATH, "%s%s%s", prefix, dllname, getenv( "LIBRARY_SUFFIX" ) );
|
Q_snprintf( path, MAX_SYSPATH, "%s%s%s", prefix, dllname, getenv( "LIBRARY_SUFFIX" ) );
|
||||||
pHandle = dlopen( path, RTLD_LAZY );
|
pHandle = dlopen( path, RTLD_LAZY );
|
||||||
if( !pHandle )
|
if( !pHandle )
|
||||||
{
|
{
|
||||||
COM_PushLibraryError( va("Loading %s:\n", path ) );
|
Q_snprintf( buf, sizeof( buf ), "Loading %s:\n", path );
|
||||||
|
COM_PushLibraryError( buf );
|
||||||
COM_PushLibraryError( dlerror() );
|
COM_PushLibraryError( dlerror() );
|
||||||
}
|
}
|
||||||
return pHandle;
|
return pHandle;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user