HookSystem: improve callback safety

This commit is contained in:
Vaxry
2024-04-20 20:16:42 +01:00
parent 1055e6bee6
commit 4ad739ec63
18 changed files with 89 additions and 105 deletions

View File

@@ -85,7 +85,7 @@ CKeybindManager::CKeybindManager() {
m_tScrollTimer.reset();
g_pHookSystem->hookDynamic("configReloaded", [this](void* hk, SCallbackInfo& info, std::any param) {
static auto P = g_pHookSystem->hookDynamic("configReloaded", [this](void* hk, SCallbackInfo& info, std::any param) {
// clear cuz realloc'd
m_pActiveKeybind = nullptr;
m_vPressedSpecialBinds.clear();