IOPBios: Defer to iopMemSafeReadBytes when HLEing writes

This commit is contained in:
Ty Lamontagne 2024-12-12 17:54:00 -05:00 committed by Ty
parent f964dfaa5e
commit 5a8921dd22
1 changed files with 6 additions and 2 deletions

View File

@ -907,8 +907,12 @@ namespace R3000A
{
auto buf = std::make_unique<char[]>(count);
[[unlikely]]
if (!iopMemSafeReadBytes(data, buf.get(), count))
{
for (u32 i = 0; i < count; i++)
buf[i] = iopMemRead8(data + i);
}
v0 = file->write(buf.get(), count);