mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-25 09:20:18 +00:00
fixup! MMIO: UnmapRegion
This commit is contained in:
parent
257e130572
commit
a9767d514f
@ -105,11 +105,11 @@ void UnmapRegion(VAddr base, u32 size) {
|
|||||||
ASSERT_MSG((base & PAGE_MASK) == 0, "non-page aligned base: %08X", base);
|
ASSERT_MSG((base & PAGE_MASK) == 0, "non-page aligned base: %08X", base);
|
||||||
MapPages(base / PAGE_SIZE, size / PAGE_SIZE, nullptr, PageType::Unmapped);
|
MapPages(base / PAGE_SIZE, size / PAGE_SIZE, nullptr, PageType::Unmapped);
|
||||||
|
|
||||||
for (auto iter = current_page_table->special_regions.begin(); iter != current_page_table->special_regions.end(); iter++) {
|
auto region_iter = std::find_if(current_page_table->special_regions.begin(), current_page_table->special_regions.end(),
|
||||||
if (base == iter->base && size == iter->size) {
|
[base, size] (const auto& region) { return base == region.base && size == region.size; });
|
||||||
current_page_table->special_regions.erase(iter);
|
|
||||||
return;
|
if (region_iter != current_page_table->special_regions.end()) {
|
||||||
}
|
current_page_table->special_regions.erase(region_iter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user