mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-26 17:36:05 -05:00
dynamically resolve dynamic_cast address
This commit is contained in:
parent
e6cd66aee7
commit
b871c2a088
1 changed files with 7 additions and 4 deletions
|
@ -12,10 +12,13 @@ $execute {
|
|||
(void)Mod::get()->patch(
|
||||
reinterpret_cast<void*>(base::get() + 0x603948), toByteArray(&cast::typeinfoCastInternal)
|
||||
);
|
||||
#elif defined(GEODE_IS_ANDROID32)
|
||||
(void)Mod::get()->addHook(reinterpret_cast<void*>(base::get() + (0x720348 - 0x10000) + 1), &cast::typeinfoCastInternal, "__dynamic_cast");
|
||||
#elif defined(GEODE_IS_ANDROID64)
|
||||
(void)Mod::get()->addHook(reinterpret_cast<void*>(base::get() + (0xd6cb8c - 0x100000)), &cast::typeinfoCastInternal, "__dynamic_cast");
|
||||
#elif defined(GEODE_IS_ANDROID)
|
||||
void* handle = dlopen("libcocos2dcpp.so", RTLD_LAZY | RTLD_NOLOAD);
|
||||
void* dynamicCastAddr = dlsym(handle, "__dynamic_cast");
|
||||
|
||||
(void)Mod::get()->addHook(dynamicCastAddr, &cast::typeinfoCastInternal, "__dynamic_cast");
|
||||
|
||||
dlclose(handle);
|
||||
#endif
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue