diff --git a/core/rend/TexCache.cpp b/core/rend/TexCache.cpp index 8ed8e3219..e68a28ee2 100644 --- a/core/rend/TexCache.cpp +++ b/core/rend/TexCache.cpp @@ -244,7 +244,7 @@ bool VramLockedWriteOffset(size_t offset) } list->clear(); - _vmem_unprotect_vram((u32)offset, PAGE_SIZE); + _vmem_unprotect_vram((u32)(offset & ~PAGE_MASK), PAGE_SIZE); vramlist_lock.Unlock(); }