From 4738e3195c6ce145786dc535148b1cbb6d93e4f9 Mon Sep 17 00:00:00 2001 From: aldelaro5 Date: Fri, 3 Mar 2017 05:06:40 -0500 Subject: [PATCH] Fix memory breakpoints not triggering on Windows For some reasons, they worked on Linux even though it was incorrect, this commit does it correctly and so it fixes that on Windows. --- Source/Core/Core/HW/Memmap.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/HW/Memmap.cpp b/Source/Core/Core/HW/Memmap.cpp index 175b030e13..da425b4686 100644 --- a/Source/Core/Core/HW/Memmap.cpp +++ b/Source/Core/Core/HW/Memmap.cpp @@ -227,9 +227,9 @@ void UpdateLogicalMemory(const PowerPC::BatTable& dbat_table) g_arena.ReleaseView(entry.mapped_pointer, entry.mapped_size); } logical_mapped_entries.clear(); - for (u32 i = 0; i < (1 << (32 - PowerPC::BAT_INDEX_SHIFT)); ++i) + for (u32 i = 0; i < dbat_table.size(); ++i) { - if (dbat_table[i] & PowerPC::BAT_MAPPED_BIT) + if (dbat_table[i] & PowerPC::BAT_PHYSICAL_BIT) { u32 logical_address = i << PowerPC::BAT_INDEX_SHIFT; // TODO: Merge adjacent mappings to make this faster.