Skip to content

Commit

Permalink
Look for the specific type of the mapping on WIndows when hooking
Browse files Browse the repository at this point in the history
The size is apparently not enough.
  • Loading branch information
aldelaro5 committed Aug 7, 2017
1 parent 778ab52 commit 4b48b30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/DolphinProcess/Windows/WindowsDolphinProcess.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ bool WindowsDolphinProcess::findEmuRAMStartAddress()
for (unsigned char* p = nullptr;
VirtualQueryEx(m_hDolphin, p, &info, sizeof(info)) == sizeof(info); p += info.RegionSize)
{
if (info.RegionSize == 0x2000000)
if (info.RegionSize == 0x2000000 && info.Type == MEM_MAPPED)
{
std::memcpy(&m_emuRAMAddressStart, &(info.BaseAddress), sizeof(info.BaseAddress));
break;
Expand Down

0 comments on commit 4b48b30

Please sign in to comment.