Skip to content

Commit 0263fa4

Browse files
committed
Print error code when DLL failed to load
1 parent cce18f3 commit 0263fa4

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/xrCore/ModuleLookup.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ void* Module::open(pcstr moduleName)
2424
Log("Loading DLL:", moduleName);
2525

2626
handle = ::LoadLibrary(moduleName);
27+
28+
if (handle == nullptr)
29+
Msg("Failed to load DLL: %d", GetLastError());
30+
2731
return handle;
2832
}
2933

src/xrEngine/EngineAPI.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,6 @@ void CEngineAPI::InitializeRenderers()
9999
renderer_value = 0; // con cmd
100100

101101
hRender->open(r1_name);
102-
if (!hRender->exist())
103-
R_CHK(GetLastError());
104102
R_ASSERT(hRender);
105103
g_current_renderer = 1;
106104
}

0 commit comments

Comments
 (0)