Skip to content

Commit 309870d

Browse files
committed
fix: gloss init
1 parent 1c1b2b5 commit 309870d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/pl/Hook.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,13 @@ static std::mutex hooksMutex{};
7777

7878
int pl_hook(FuncPtr target, FuncPtr detour, FuncPtr *originalFunc,
7979
Priority priority) {
80+
81+
static bool initialized = false;
82+
if (!initialized) {
83+
GlossInit(true);
84+
initialized = true;
85+
}
86+
8087
std::lock_guard lock(hooksMutex);
8188
auto it = getHooks().find(target);
8289
if (it != getHooks().end()) {

0 commit comments

Comments
 (0)