X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libpcsxcore%2Fpsxmem.h;h=4e95c4dd11cd5a344510d405cef91e8057e6c9bc;hb=9ed80467762a5024f7ba04e9fb384faceca35c29;hp=a52472c6d08a422da2ae02ea3138f3a30a753d4e;hpb=4bb8d7e16bad9322d862d6d0dcaa048d75064c1f;p=pcsx_rearmed.git diff --git a/libpcsxcore/psxmem.h b/libpcsxcore/psxmem.h index a52472c6..4e95c4dd 100644 --- a/libpcsxcore/psxmem.h +++ b/libpcsxcore/psxmem.h @@ -116,12 +116,17 @@ extern u8 **psxMemWLUT; extern u8 **psxMemRLUT; extern int cache_isolated; +#ifndef DISABLE_MEM_LUTS +#define DISABLE_MEM_LUTS 0 +#endif + static inline void * psxm_lut(u32 mem, int write, u8 **lut) { if (!DISABLE_MEM_LUTS) { void *ptr = lut[mem >> 16]; - return ptr == INVALID_PTR ? INVALID_PTR : ptr + (u16)mem; + return ptr == INVALID_PTR ? INVALID_PTR + : (void *)((uintptr_t)ptr + (u16)mem); } if (mem >= 0xa0000000)