mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-23 07:57:51 -05:00
add check for gd version in DynamicCastFix.cpp
prevents silently breaking macos
This commit is contained in:
parent
37fb2a3ddf
commit
1af10eea7f
1 changed files with 4 additions and 0 deletions
|
@ -8,6 +8,10 @@ $execute {
|
||||||
// this is needed because the transitions in cocos uses dynamic cast to check
|
// this is needed because the transitions in cocos uses dynamic cast to check
|
||||||
// layers, which fail on user layers due to typeinfo not matching
|
// layers, which fail on user layers due to typeinfo not matching
|
||||||
|
|
||||||
|
#if defined(GEODE_IS_MAC) && GEODE_COMP_GD_VERSION != 22074
|
||||||
|
#error "Unsupported version for macOS dynamic cast fix, please update the addresses"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(GEODE_IS_INTEL_MAC)
|
#if defined(GEODE_IS_INTEL_MAC)
|
||||||
void* dynamicCastAddr = reinterpret_cast<void*>(base::get() + 0x7ba1d8);
|
void* dynamicCastAddr = reinterpret_cast<void*>(base::get() + 0x7ba1d8);
|
||||||
(void) Mod::get()->hook(dynamicCastAddr, &cast::typeinfoCastInternal, "__dynamic_cast");
|
(void) Mod::get()->hook(dynamicCastAddr, &cast::typeinfoCastInternal, "__dynamic_cast");
|
||||||
|
|
Loading…
Reference in a new issue