mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-29 16:24:16 +00:00
engine: platform: posix: replace va function calls.
This commit is contained in:
parent
a2d459ae84
commit
b648c74815
@ -82,6 +82,7 @@ void *COM_LoadLibrary( const char *dllname, int build_ordinals_table, qboolean d
|
||||
{
|
||||
dll_user_t *hInst = NULL;
|
||||
void *pHandle = NULL;
|
||||
char buf[MAX_VA_STRING];
|
||||
|
||||
COM_ResetLibraryError();
|
||||
|
||||
@ -110,7 +111,8 @@ void *COM_LoadLibrary( const char *dllname, int build_ordinals_table, qboolean d
|
||||
if( pHandle )
|
||||
return pHandle;
|
||||
|
||||
COM_PushLibraryError( va( "Failed to find library %s", dllname ));
|
||||
Q_snprintf( buf, sizeof( buf ), "Failed to find library %s", dllname );
|
||||
COM_PushLibraryError( buf );
|
||||
COM_PushLibraryError( dlerror() );
|
||||
return NULL;
|
||||
}
|
||||
@ -118,7 +120,8 @@ void *COM_LoadLibrary( const char *dllname, int build_ordinals_table, qboolean d
|
||||
|
||||
if( hInst->custom_loader )
|
||||
{
|
||||
COM_PushLibraryError( va( "Custom library loader is not available. Extract library %s and fix gameinfo.txt!", hInst->fullPath ));
|
||||
Q_snprintf( buf, sizeof( buf ), "Custom library loader is not available. Extract library %s and fix gameinfo.txt!", hInst->fullPath );
|
||||
COM_PushLibraryError( buf );
|
||||
Mem_Free( hInst );
|
||||
return NULL;
|
||||
}
|
||||
@ -128,14 +131,16 @@ void *COM_LoadLibrary( const char *dllname, int build_ordinals_table, qboolean d
|
||||
{
|
||||
if( hInst->encrypted )
|
||||
{
|
||||
COM_PushLibraryError( va( "Library %s is encrypted. Cannot load", hInst->shortPath ) );
|
||||
Q_snprintf( buf, sizeof( buf ), "Library %s is encrypted. Cannot load", hInst->shortPath );
|
||||
COM_PushLibraryError( buf );
|
||||
Mem_Free( hInst );
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if( !( hInst->hInstance = Loader_LoadLibrary( hInst->fullPath ) ) )
|
||||
{
|
||||
COM_PushLibraryError( va( "Failed to load DLL with DLL loader: %s", hInst->shortPath ) );
|
||||
Q_snprintf( buf, sizeof( buf ), "Failed to load DLL with DLL loader: %s", hInst->shortPath );
|
||||
COM_PushLibraryError( buf );
|
||||
Mem_Free( hInst );
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user