From e0b8c338a81e71660fe005d84e1631a22ed73a04 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Fri, 11 Oct 2019 11:46:59 +0300 Subject: [PATCH] engine: ref: more verbose refdll loading --- engine/client/ref_common.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/engine/client/ref_common.c b/engine/client/ref_common.c index 69670125..6a001428 100644 --- a/engine/client/ref_common.c +++ b/engine/client/ref_common.c @@ -434,6 +434,7 @@ static qboolean R_LoadProgs( const char *name ) if( !(ref.hInstance = COM_LoadLibrary( name, false, true ) )) { FS_AllowDirectPaths( false ); + Con_Reportf( "R_LoadProgs: can't load renderer library %s: %s\n", name, COM_GetLibraryError() ); return false; } @@ -442,7 +443,7 @@ static qboolean R_LoadProgs( const char *name ) if( !( GetRefAPI = (REFAPI)COM_GetProcAddress( ref.hInstance, GET_REF_API )) ) { 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; return false; } @@ -590,11 +591,15 @@ void R_CollectRendererNames( void ) dll = COM_LoadLibrary( temp, false, true ); if( !dll ) + { + Con_Reportf( "R_CollectRendererNames: can't load library %s: %s\n", temp, COM_GetLibraryError() ); continue; + } pfn = COM_GetProcAddress( dll, GET_REF_API ); if( !pfn ) { + Con_Reportf( "R_CollectRendererNames: can't find API entry point in %s\n", temp, COM_GetLibraryError() ); COM_FreeLibrary( dll ); continue; } @@ -604,6 +609,7 @@ void R_CollectRendererNames( void ) pfn = COM_GetProcAddress( dll, GET_REF_HUMANREADABLE_NAME ); 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] )); } else