handle hook conflicts

This commit is contained in:
madeline
2026-04-23 05:17:15 -07:00
parent 99fb2b89ce
commit fb08cfcc6b
5 changed files with 42 additions and 19 deletions
+2 -2
View File
@@ -7,8 +7,8 @@ namespace dusk {
void hookInstallByAddr(void* fn_addr, void* tramp_fn, void** orig_store);
void hookRegisterPre (void* fn_addr, void* mod, int32_t (*fn)(void* args));
void hookRegisterPost(void* fn_addr, void* mod, void (*fn)(void* args));
void hookSetReplace (void* fn_addr, void* mod, void (*fn)(void* args));
void hookRegisterPost(void* fn_addr, void* mod, const char* mod_name, void (*fn)(void* args));
bool hookSetReplace (void* fn_addr, void* mod, const char* mod_name, void (*fn)(void* args));
bool hookDispatchPre (void* fn_addr, void* args);
void hookDispatchPost(void* fn_addr, void* args);
+3 -2
View File
@@ -21,8 +21,9 @@ struct LoadedMod {
std::string mod_path;
std::string dir;
void* handle = nullptr;
bool active = false;
void* handle = nullptr;
bool active = false;
bool load_failed = false;
using FnInit = void (*)(DuskModAPI*);
using FnTick = void (*)(DuskModAPI*);