2023-01-24 11:27:46 -05:00
|
|
|
#include <Geode/DefaultInclude.hpp>
|
|
|
|
|
|
|
|
#ifdef GEODE_IS_MACOS
|
|
|
|
|
|
|
|
USE_GEODE_NAMESPACE();
|
|
|
|
|
2023-02-08 08:42:34 -05:00
|
|
|
#include <Geode/loader/Mod.hpp>
|
|
|
|
#include <Geode/modify/Modify.hpp>
|
2023-01-24 11:27:46 -05:00
|
|
|
|
|
|
|
$execute {
|
|
|
|
// this replaces the call to __dynamic_cast with a call to our own
|
|
|
|
// this is needed because the transitions in cocos uses dynamic cast to check
|
|
|
|
// layers, which fail on user layers due to typeinfo not matching
|
|
|
|
(void)Mod::get()->patch(
|
2023-02-08 08:42:34 -05:00
|
|
|
reinterpret_cast<void*>(base::get() + 0x603948), toByteArray(&cast::typeinfoCastInternal)
|
2023-01-24 11:27:46 -05:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|