mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-11-18 05:09:58 +00:00
Merge pull request #13070 from liamwhite/offset
am: account for offset in transfer memory storage
This commit is contained in:
commit
ef89b79d7e
1 changed files with 2 additions and 2 deletions
|
@ -70,7 +70,7 @@ public:
|
||||||
Result Read(s64 offset, void* buffer, size_t size) override {
|
Result Read(s64 offset, void* buffer, size_t size) override {
|
||||||
R_TRY(ValidateOffset(offset, size, m_size));
|
R_TRY(ValidateOffset(offset, size, m_size));
|
||||||
|
|
||||||
m_memory.ReadBlock(m_trmem->GetSourceAddress(), buffer, size);
|
m_memory.ReadBlock(m_trmem->GetSourceAddress() + offset, buffer, size);
|
||||||
|
|
||||||
R_SUCCEED();
|
R_SUCCEED();
|
||||||
}
|
}
|
||||||
|
@ -79,7 +79,7 @@ public:
|
||||||
R_UNLESS(m_is_writable, ResultUnknown);
|
R_UNLESS(m_is_writable, ResultUnknown);
|
||||||
R_TRY(ValidateOffset(offset, size, m_size));
|
R_TRY(ValidateOffset(offset, size, m_size));
|
||||||
|
|
||||||
m_memory.WriteBlock(m_trmem->GetSourceAddress(), buffer, size);
|
m_memory.WriteBlock(m_trmem->GetSourceAddress() + offset, buffer, size);
|
||||||
|
|
||||||
R_SUCCEED();
|
R_SUCCEED();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue