support B2 patches on BB

This commit is contained in:
Martin Michelsen
2024-05-05 10:51:13 -07:00
parent 27bbb2c7e4
commit 70413668d8
4 changed files with 83 additions and 12 deletions
+2 -1
View File
@@ -392,8 +392,9 @@ shared_ptr<const Menu> FunctionCodeIndex::patch_switches_menu(
}
bool FunctionCodeIndex::patch_menu_empty(uint32_t specific_version) const {
uint32_t mask = specific_version_is_indeterminate(specific_version) ? 0xFF000000 : 0xFFFFFFFF;
for (const auto& it : this->menu_item_id_and_specific_version_to_patch_function) {
if ((it.first & 0xFF000000) == (specific_version & 0xFF000000)) {
if ((it.first & mask) == (specific_version & mask)) {
return false;
}
}