mirror of https://github.com/PCSX2/pcsx2.git
IOPBios: Defer to iopMemSafeReadBytes when HLEing writes
This commit is contained in:
parent
f964dfaa5e
commit
5a8921dd22
|
@ -907,8 +907,12 @@ namespace R3000A
|
||||||
{
|
{
|
||||||
auto buf = std::make_unique<char[]>(count);
|
auto buf = std::make_unique<char[]>(count);
|
||||||
|
|
||||||
for (u32 i = 0; i < count; i++)
|
[[unlikely]]
|
||||||
buf[i] = iopMemRead8(data + i);
|
if (!iopMemSafeReadBytes(data, buf.get(), count))
|
||||||
|
{
|
||||||
|
for (u32 i = 0; i < count; i++)
|
||||||
|
buf[i] = iopMemRead8(data + i);
|
||||||
|
}
|
||||||
|
|
||||||
v0 = file->write(buf.get(), count);
|
v0 = file->write(buf.get(), count);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue