Commit d1323eb0a959b401c65e51c1c917ee101d6b880d

Ozkan Sezer 2020-10-14T23:01:01

os2: better error reporting from loadso

diff --git a/src/loadso/os2/SDL_sysloadso.c b/src/loadso/os2/SDL_sysloadso.c
index 4943ec1..2667712 100644
--- a/src/loadso/os2/SDL_sysloadso.c
+++ b/src/loadso/os2/SDL_sysloadso.c
@@ -44,7 +44,7 @@ SDL_LoadObject(const char *sofile)
   SDL_free( pszModName );
   if ( ulRC != NO_ERROR )
   {
-    SDL_SetError( "Failed loading, module: %s", pszModName );
+    SDL_SetError( "Failed loading %s (E%u)", acError, ulRC );
     return NULL;
   }
 
@@ -58,9 +58,9 @@ SDL_LoadFunction(void *handle, const char *name)
   PFN        pFN;
 
   ulRC = DosQueryProcAddr( (HMODULE)handle, 0, name, &pFN );
-  if ( ulRC )
+  if ( ulRC != NO_ERROR )
   {
-    SDL_SetError( "Failed loading, procedure: %s", name );
+    SDL_SetError( "Failed loading procedure %s (E%u)", name, ulRC );
     return NULL;
   }