mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
Merge pull request #9912 from Pokechu22/memory-viewer-physical-mem2
Fix MEM2 in the memory viewer in physical mode
This commit is contained in:
commit
9a91b867ab
@ -246,22 +246,22 @@ struct CompositeAddressSpaceAccessors : Accessors
|
||||
|
||||
u8 ReadU8(u32 address) const override
|
||||
{
|
||||
auto it = FindAppropriateAccessor(address);
|
||||
if (it == m_accessor_mappings.end())
|
||||
auto mapping = FindAppropriateAccessor(address);
|
||||
if (mapping == m_accessor_mappings.end())
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return it->accessors->ReadU8(address);
|
||||
return mapping->accessors->ReadU8(address - mapping->base);
|
||||
}
|
||||
|
||||
void WriteU8(u32 address, u8 value) override
|
||||
{
|
||||
auto it = FindAppropriateAccessor(address);
|
||||
if (it == m_accessor_mappings.end())
|
||||
auto mapping = FindAppropriateAccessor(address);
|
||||
if (mapping == m_accessor_mappings.end())
|
||||
{
|
||||
return;
|
||||
}
|
||||
return it->accessors->WriteU8(address, value);
|
||||
return mapping->accessors->WriteU8(address - mapping->base, value);
|
||||
}
|
||||
|
||||
std::optional<u32> Search(u32 haystack_offset, const u8* needle_start, std::size_t needle_size,
|
||||
|
Loading…
Reference in New Issue
Block a user