diff --git a/bindings/Cocos2d.bro b/bindings/Cocos2d.bro index 1428dcfa..d2be06dc 100644 --- a/bindings/Cocos2d.bro +++ b/bindings/Cocos2d.bro @@ -310,7 +310,7 @@ class cocos2d::CCFileUtils : cocos2d::TypeInfo { static void purgeFileUtils(); virtual void addSearchPath(const char* path); virtual void removeSearchPath(const char *path); - virtual std::string fullPathForFilename(const char* filename, bool unk); + virtual gd::string fullPathForFilename(const char* filename, bool unk); void removeAllPaths() = mac 0x241600; } diff --git a/loader/include/Geode/utils/addresser.hpp b/loader/include/Geode/utils/addresser.hpp index f8f0ffc2..08bffc10 100644 --- a/loader/include/Geode/utils/addresser.hpp +++ b/loader/include/Geode/utils/addresser.hpp @@ -91,6 +91,14 @@ namespace geode::addresser { *reinterpret_cast(reinterpret_cast(ins) + thunk) + index ); + #ifdef GEODE_IS_WINDOWS + // if the first instruction is a long jmp then this might still be a thunk + if (*reinterpret_cast(address) == 0xE9) { + auto relative = *reinterpret_cast(address + 1); + address = address + relative + 5; + } + #endif + address = followThunkFunction(address); return address;