diff --git a/src/main.cpp b/src/main.cpp index c29250c..e49af13 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -13,6 +13,17 @@ void setupPageLimitBypassWindows() { res = Mod::get()->patch(reinterpret_cast(base::get() + 0x14371C), {0x06}); } +void setupPageLimitBypassMac() { + //This patches the maximum number for SetIDPopup to INT_MAX + // The relevant function is SetIDPopup::create (Windows) or SetIDPopup::init (Android) + auto res = Mod::get()->patch(reinterpret_cast(base::get() + 0x2529BA), {0xBA, 0xFF, 0xFF, 0xFF, 0x7F}); + + + //This patches the amount of characters allowed in the text input in SetIDPopup to 6 characters + // The relevant function is SetIDPopup::init + res = Mod::get()->patch(reinterpret_cast(base::get() + 0x154A3B), {0x06}); +} + void setupPageLimitBypass() { /* * SetIDPopup is one of those hyperoptimized classes where the func signature @@ -27,6 +38,12 @@ void setupPageLimitBypass() { log::info("Performing Windows specific loading steps"); setupPageLimitBypassWindows(); #endif + + #ifdef GEODE_IS_MACOS + log::info("Performing Mac specific loading steps"); + setupPageLimitBypassMac(); + #endif + } $execute {