From: Paul Cercueil Date: Thu, 24 Aug 2023 20:08:04 +0000 (+0200) Subject: lightrec: Allow to override code buffer size X-Git-Tag: r24l~231^2 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4cc7c9233f03fb9bd4f535eda468989c1c67d901;p=pcsx_rearmed.git lightrec: Allow to override code buffer size Allow the CODE_BUFFER_SIZE macro to be overriden. This is helpful on platforms that don't want a 8 MiB buffer. Signed-off-by: Paul Cercueil --- diff --git a/libpcsxcore/lightrec/mem.h b/libpcsxcore/lightrec/mem.h index f746650b..9984604e 100644 --- a/libpcsxcore/lightrec/mem.h +++ b/libpcsxcore/lightrec/mem.h @@ -9,11 +9,15 @@ #ifdef LIGHTREC #ifdef HW_WUP /* WiiU */ -# define WUP_RWX_MEM_BASE 0x00802000 -# define WUP_RWX_MEM_END 0x01000000 -# define CODE_BUFFER_SIZE (WUP_RWX_MEM_END - WUP_RWX_MEM_BASE) +# define WUP_RWX_MEM_BASE 0x00802000 +# define WUP_RWX_MEM_END 0x01000000 +# define CODE_BUFFER_SIZE_DFT (WUP_RWX_MEM_END - WUP_RWX_MEM_BASE) #else -# define CODE_BUFFER_SIZE (8 * 1024 * 1024) +# define CODE_BUFFER_SIZE_DFT (8 * 1024 * 1024) +#endif + +#ifndef CODE_BUFFER_SIZE +#define CODE_BUFFER_SIZE CODE_BUFFER_SIZE_DFT #endif extern void *code_buffer;