macos early version check

This commit is contained in:
altalk23 2024-05-26 16:06:03 +03:00
parent a4c6b71ee4
commit 408395064d

View file

@ -136,6 +136,20 @@ void applicationDidFinishLaunchingHook(void* self, SEL sel, NSNotification* noti
bool loadGeode() {
if (GEODE_STR(GEODE_GD_VERSION) != Loader::get()->getGameVersion()) {
console::messageBox(
"Unable to Load Geode!",
fmt::format(
"This version of Geode is made for Geometry Dash {} "
"but you're trying to play with GD {}.\n"
"Please, update your game.",
GEODE_STR(GEODE_GD_VERSION),
LoaderImpl::get()->getGameVersion()
)
);
return false;
}
auto detourAddr = reinterpret_cast<uintptr_t>(&applicationDidFinishLaunchingHook) - geode::base::get() - ENTRY_ADDRESS - 5;
auto detourAddrPtr = reinterpret_cast<uint8_t*>(&detourAddr);