mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-14 19:15:05 -05:00
dynamic cast hooks for macos
This commit is contained in:
parent
f08856f663
commit
712caa4c1e
1 changed files with 5 additions and 2 deletions
|
@ -8,9 +8,12 @@ $execute {
|
|||
// this is needed because the transitions in cocos uses dynamic cast to check
|
||||
// layers, which fail on user layers due to typeinfo not matching
|
||||
|
||||
#if defined(GEODE_IS_MACOS)
|
||||
void* dynamicCastAddr = reinterpret_cast<void*>(base::get() + 0x7a7c9f);
|
||||
#if defined(GEODE_IS_INTEL_MAC)
|
||||
void* dynamicCastAddr = reinterpret_cast<void*>(base::get() + 0x7dd5e7);
|
||||
(void) Mod::get()->hook(dynamicCastAddr, &cast::typeinfoCastInternal, "__dynamic_cast");
|
||||
#elif defined(GEODE_IS_ARM_MAC)
|
||||
void* dynamicCastAddr = reinterpret_cast<void*>(base::get() + 0x6dfb10);
|
||||
(void)Mod::get()->hook(dynamicCastAddr, &cast::typeinfoCastInternal, "__dynamic_cast");
|
||||
#elif defined(GEODE_IS_ANDROID)
|
||||
void* handle = dlopen("libcocos2dcpp.so", RTLD_LAZY | RTLD_NOLOAD);
|
||||
void* dynamicCastAddr = dlsym(handle, "__dynamic_cast");
|
||||
|
|
Loading…
Reference in a new issue