lightrec: try to clean up intergarion, fix -O0
[pcsx_rearmed.git] / libpcsxcore / lightrec / mem.h
index d747c17..98dbbde 100644 (file)
@@ -6,6 +6,8 @@
 #ifndef __LIGHTREC_MEM_H__
 #define __LIGHTREC_MEM_H__
 
+#ifdef LIGHTREC
+
 #define CODE_BUFFER_SIZE (8 * 1024 * 1024)
 
 extern void *code_buffer;
@@ -13,4 +15,14 @@ extern void *code_buffer;
 int lightrec_init_mmap(void);
 void lightrec_free_mmap(void);
 
+#else /* if !LIGHTREC */
+
+#define lightrec_init_mmap() -1 /* should not be called */
+#define lightrec_free_mmap()
+
+#undef LIGHTREC_CUSTOM_MAP
+#define LIGHTREC_CUSTOM_MAP 0
+
+#endif
+
 #endif /* __LIGHTREC_MEM_H__ */