Skip to content

Commit 861c9dc

Browse files
committed
move MH_Initialize from constructor
1 parent 2ae483c commit 861c9dc

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/client/Latite.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ DWORD __stdcall startThread(HINSTANCE dll) {
303303
Logger::Info("Resolved {} signatures ({} dead)", sigCount, deadCount);
304304
#endif
305305

306+
MH_Initialize();
306307
new (hooks) LatiteHooks();
307308

308309
new (keyboardBuf) Keyboard(reinterpret_cast<int*>(Signatures::KeyMap.result));

src/client/hook/Hooks.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515
using namespace std::chrono_literals;
1616

1717

18-
LatiteHooks::LatiteHooks() {
19-
MH_Initialize();
20-
}
18+
LatiteHooks::LatiteHooks() {}
2119

2220
LatiteHooks::~LatiteHooks() {
2321
MH_Uninitialize();

0 commit comments

Comments
 (0)