Fix similar bug in sys_rsx_context_iomap

TODO: Is there an rsxmem unmap event for those cases?
This commit is contained in:
Eladash 2019-07-22 08:34:26 +04:00 committed by kd-11
parent cf4d715284
commit d17be2c2ec
1 changed files with 2 additions and 1 deletions

View File

@ -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;