Skip to content

Commit

Permalink
add page limit bypass for mac
Browse files Browse the repository at this point in the history
  • Loading branch information
Cvolton committed Aug 25, 2023
1 parent 95239fd commit 75ef933
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@ void setupPageLimitBypassWindows() {
res = Mod::get()->patch(reinterpret_cast<void*>(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<void*>(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<void*>(base::get() + 0x154A3B), {0x06});
}

void setupPageLimitBypass() {
/*
* SetIDPopup is one of those hyperoptimized classes where the func signature
Expand All @@ -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 {
Expand Down

0 comments on commit 75ef933

Please sign in to comment.