lightrec: Improve hack around icache emulation
[pcsx_rearmed.git] / libpcsxcore / lightrec / plugin.c
index 70d01bf..27fdc47 100644 (file)
@@ -571,7 +571,8 @@ static void lightrec_plugin_execute_block(enum blockExecCaller caller)
 
 static void lightrec_plugin_clear(u32 addr, u32 size)
 {
-       if (addr == 0 && size == UINT32_MAX)
+       if ((addr == 0 && size == UINT32_MAX)
+           || (lightrec_hacks & LIGHTREC_OPT_INV_DMA_ONLY))
                lightrec_invalidate_all(lightrec_state);
        else
                /* size * 4: PCSX uses DMA units */