Skip to content

Commit

Permalink
Fix a (possible?) bug, not quite sure
Browse files Browse the repository at this point in the history
  • Loading branch information
FromDarkHell committed Dec 22, 2020
1 parent 87a71de commit de172e7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion BL3DX11Injection/PluginLoadHook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ void LoadPlugins() {
threads.push_back(std::thread(PluginLoadFunction, filePath, (long) (delayTime * 1000)));
}
else {
LogString(L"Loading Plugin: " + filePath + L"\n");
HMODULE hMod = LoadLibrary(filePath.c_str());
if (hMod)
loadedModules.push_back(hMod);
Expand All @@ -107,8 +108,8 @@ HMODULE WINAPI LoadLibraryWHook(LPCWSTR lpLibFileName) {
LogString(L"Loading Library: " + std::wstring(lpLibFileName) + L"\n");

if (std::wstring(lpLibFileName).find(L"APEX_Clothing_x64") != std::string::npos) {
CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)LoadPlugins, NULL, NULL, NULL);
RemoveHook(OriginalLoadLibrary);
CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)LoadPlugins, NULL, NULL, NULL);
return LoadLibrary(lpLibFileName);
}

Expand Down

0 comments on commit de172e7

Please sign in to comment.