2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-11-22 18:07:09 +01:00

engine: ref: more verbose refdll loading

This commit is contained in:
Alibek Omarov 2019-10-11 11:46:59 +03:00
parent ee363ebb74
commit e0b8c338a8

View File

@ -434,6 +434,7 @@ static qboolean R_LoadProgs( const char *name )
if( !(ref.hInstance = COM_LoadLibrary( name, false, true ) )) if( !(ref.hInstance = COM_LoadLibrary( name, false, true ) ))
{ {
FS_AllowDirectPaths( false ); FS_AllowDirectPaths( false );
Con_Reportf( "R_LoadProgs: can't load renderer library %s: %s\n", name, COM_GetLibraryError() );
return false; return false;
} }
@ -442,7 +443,7 @@ static qboolean R_LoadProgs( const char *name )
if( !( GetRefAPI = (REFAPI)COM_GetProcAddress( ref.hInstance, GET_REF_API )) ) if( !( GetRefAPI = (REFAPI)COM_GetProcAddress( ref.hInstance, GET_REF_API )) )
{ {
COM_FreeLibrary( ref.hInstance ); COM_FreeLibrary( ref.hInstance );
Con_Reportf( "R_LoadProgs: can't init renderer API\n" ); Con_Reportf( "R_LoadProgs: can't find GetRefAPI entry point in %s: %s\n", name );
ref.hInstance = NULL; ref.hInstance = NULL;
return false; return false;
} }
@ -590,11 +591,15 @@ void R_CollectRendererNames( void )
dll = COM_LoadLibrary( temp, false, true ); dll = COM_LoadLibrary( temp, false, true );
if( !dll ) if( !dll )
{
Con_Reportf( "R_CollectRendererNames: can't load library %s: %s\n", temp, COM_GetLibraryError() );
continue; continue;
}
pfn = COM_GetProcAddress( dll, GET_REF_API ); pfn = COM_GetProcAddress( dll, GET_REF_API );
if( !pfn ) if( !pfn )
{ {
Con_Reportf( "R_CollectRendererNames: can't find API entry point in %s\n", temp, COM_GetLibraryError() );
COM_FreeLibrary( dll ); COM_FreeLibrary( dll );
continue; continue;
} }
@ -604,6 +609,7 @@ void R_CollectRendererNames( void )
pfn = COM_GetProcAddress( dll, GET_REF_HUMANREADABLE_NAME ); pfn = COM_GetProcAddress( dll, GET_REF_HUMANREADABLE_NAME );
if( !pfn ) // just in case if( !pfn ) // just in case
{ {
Con_Reportf( "R_CollectRendererNames: can't find GetHumanReadableName export in %s\n", temp, COM_GetLibraryError() );
Q_strncpy( ref.readableNames[i], renderers[i], sizeof( ref.readableNames[i] )); Q_strncpy( ref.readableNames[i], renderers[i], sizeof( ref.readableNames[i] ));
} }
else else