mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-01-31 01:15:24 +01:00
IOPBios: Defer to iopMemSafeWriteBytes when HLEing reads
This commit is contained in:
@@ -852,8 +852,16 @@ namespace R3000A
|
||||
|
||||
v0 = file->read(buf.get(), count);
|
||||
|
||||
for (s32 i = 0; i < (s32)v0; i++)
|
||||
iopMemWrite8(data + i, buf[i]);
|
||||
[[likely]]
|
||||
if (v0 >= 0 && iopMemSafeWriteBytes(data, buf.get(), v0))
|
||||
{
|
||||
psxCpu->Clear(data, (v0 + 3) / 4);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (s32 i = 0; i < static_cast<s32>(v0); i++)
|
||||
iopMemWrite8(data + i, buf[i]);
|
||||
}
|
||||
|
||||
pc = ra;
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user