mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 11:36:13 +00:00
Fix similar bug in sys_rsx_context_iomap
TODO: Is there an rsxmem unmap event for those cases?
This commit is contained in:
parent
cf4d715284
commit
d17be2c2ec
1 changed files with 2 additions and 1 deletions
|
@ -199,8 +199,9 @@ error_code sys_rsx_context_iomap(u32 context_id, u32 io, u32 ea, u32 size, u64 f
|
|||
|
||||
for (u32 i = 0; i < size; i++)
|
||||
{
|
||||
const u32 prev_ea = std::exchange(RSXIOMem.ea[io + i].raw(), ea + i);
|
||||
if (prev_ea < 0xC00) RSXIOMem.io[prev_ea].raw() = 0xFFFF; // Clear previous mapping if exists
|
||||
RSXIOMem.io[ea + i].raw() = io + i;
|
||||
RSXIOMem.ea[io + i].raw() = ea + i;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
|
|
Loading…
Add table
Reference in a new issue