mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-23 07:57:51 -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(
|
(void)Mod::get()->patch(
|
||||||
reinterpret_cast<void*>(base::get() + 0x603948), toByteArray(&cast::typeinfoCastInternal)
|
reinterpret_cast<void*>(base::get() + 0x603948), toByteArray(&cast::typeinfoCastInternal)
|
||||||
);
|
);
|
||||||
#elif defined(GEODE_IS_ANDROID32)
|
#elif defined(GEODE_IS_ANDROID)
|
||||||
(void)Mod::get()->addHook(reinterpret_cast<void*>(base::get() + (0x720348 - 0x10000) + 1), &cast::typeinfoCastInternal, "__dynamic_cast");
|
void* handle = dlopen("libcocos2dcpp.so", RTLD_LAZY | RTLD_NOLOAD);
|
||||||
#elif defined(GEODE_IS_ANDROID64)
|
void* dynamicCastAddr = dlsym(handle, "__dynamic_cast");
|
||||||
(void)Mod::get()->addHook(reinterpret_cast<void*>(base::get() + (0xd6cb8c - 0x100000)), &cast::typeinfoCastInternal, "__dynamic_cast");
|
|
||||||
|
(void)Mod::get()->addHook(dynamicCastAddr, &cast::typeinfoCastInternal, "__dynamic_cast");
|
||||||
|
|
||||||
|
dlclose(handle);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue