Skip to content

Commit

Permalink
Print error code when DLL failed to load
Browse files Browse the repository at this point in the history
  • Loading branch information
Xottab-DUTY committed Jan 9, 2018
1 parent cce18f3 commit 0263fa4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/xrCore/ModuleLookup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ void* Module::open(pcstr moduleName)
Log("Loading DLL:", moduleName);

handle = ::LoadLibrary(moduleName);

if (handle == nullptr)
Msg("Failed to load DLL: %d", GetLastError());

return handle;
}

Expand Down
2 changes: 0 additions & 2 deletions src/xrEngine/EngineAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ void CEngineAPI::InitializeRenderers()
renderer_value = 0; // con cmd

hRender->open(r1_name);
if (!hRender->exist())
R_CHK(GetLastError());
R_ASSERT(hRender);
g_current_renderer = 1;
}
Expand Down

0 comments on commit 0263fa4

Please sign in to comment.