mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-25 07:21:14 +01:00
Fix MEM2 in the memory viewer in physical mode
This commit is contained in:
parent
6e7698a354
commit
2d460b8e31
@ -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…
x
Reference in New Issue
Block a user