CFLAGS += -O2 -DNDEBUG
endif
endif
-CFLAGS += -DHAVE_MMAP=$(if $(NO_MMAP),0,1) \
- -DHAVE_PTHREAD=$(if $(NO_PTHREAD),0,1) \
- -DHAVE_POSIX_MEMALIGN=$(if $(NO_POSIX_MEMALIGN),0,1)
+CFLAGS += -DP_HAVE_MMAP=$(if $(NO_MMAP),0,1) \
+ -DP_HAVE_PTHREAD=$(if $(NO_PTHREAD),0,1) \
+ -DP_HAVE_POSIX_MEMALIGN=$(if $(NO_POSIX_MEMALIGN),0,1)
CXXFLAGS += $(CFLAGS)
#DRC_DBG = 1
#PCNT = 1
ifeq "$(USE_LIBRETRO_VFS)" "1"
OBJS += deps/libretro-common/compat/compat_posix_string.o
OBJS += deps/libretro-common/compat/fopen_utf8.o
-OBJS += deps/libretro-common/encodings/compat_strl.o
+OBJS += deps/libretro-common/compat/compat_strl.o
OBJS += deps/libretro-common/encodings/encoding_utf.o
OBJS += deps/libretro-common/file/file_path.o
OBJS += deps/libretro-common/streams/file_stream.o
spu_config.iUseThread = 0;
}
- if (HAVE_PTHREAD) {
+ if (P_HAVE_PTHREAD) {
var.value = NULL;
var.key = "pcsx_rearmed_async_cd";
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
#ifdef _3DS
vout_buf = linearMemAlign(VOUT_MAX_WIDTH * VOUT_MAX_HEIGHT * 2, 0x80);
-#elif defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200112L) && HAVE_POSIX_MEMALIGN
+#elif defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200112L) && P_HAVE_POSIX_MEMALIGN
if (posix_memalign(&vout_buf, 16, VOUT_MAX_WIDTH * VOUT_MAX_HEIGHT * 2) != 0)
vout_buf = (void *) 0;
#else
},
"enabled",
},
-#if HAVE_PTHREAD
+#if P_HAVE_PTHREAD
{
"pcsx_rearmed_spu_thread",
"Threaded SPU",
},
"disabled",
},
-#endif // HAVE_PTHREAD
+#endif // P_HAVE_PTHREAD
{
"pcsx_rearmed_show_input_settings",
"Show Input Settings",
SOURCES_ASM :=
COREFLAGS := -ffast-math -funroll-loops -DHAVE_LIBRETRO -DNO_FRONTEND -DFRONTEND_SUPPORTS_RGB565 -DANDROID -DREARMED
-COREFLAGS += -DHAVE_MMAP=1 -DHAVE_PTHREAD=1 -DHAVE_POSIX_MEMALIGN=1 -DHAVE_CHD -D_7ZIP_ST
+COREFLAGS += -DP_HAVE_MMAP=1 -DP_HAVE_PTHREAD=1 -DP_HAVE_POSIX_MEMALIGN=1 -DHAVE_CHD -D_7ZIP_ST
ifeq ($(USE_LIBRETRO_VFS),1)
SOURCES_C += \
#include <process.h>
#include <windows.h>
#define strcasecmp _stricmp
-#elif HAVE_PTHREAD
+#elif P_HAVE_PTHREAD
#include <pthread.h>
#include <sys/time.h>
#include <unistd.h>
// to enable the USE_READ_THREAD code, fix:
// - https://github.com/notaz/pcsx_rearmed/issues/257
// - ISOgetBufferSub to not race with async code
-#define USE_READ_THREAD 0 //HAVE_PTHREAD
+#define USE_READ_THREAD 0 //P_HAVE_PTHREAD
#ifdef USE_LIBRETRO_VFS
#include <streams/file_stream_transforms.h>
#endif //_WIN32
-#if defined(_WIN32) || !HAVE_MMAP
+#if defined(_WIN32) || !P_HAVE_MMAP
#include <sys/types.h>
#ifdef __cplusplus
static void * psxMapDefault(unsigned long addr, size_t size,
int is_fixed, enum psxMapTag tag)
{
-#if !HAVE_MMAP
+#if !P_HAVE_MMAP
void *ptr;
ptr = malloc(size);
static void psxUnmapDefault(void *ptr, size_t size, enum psxMapTag tag)
{
-#if !HAVE_MMAP
+#if !P_HAVE_MMAP
free(ptr);
#else
munmap(ptr, size);
// optional worker thread handling
-#if HAVE_PTHREAD || defined(WANT_THREAD_CODE)
+#if P_HAVE_PTHREAD || defined(WANT_THREAD_CODE)
// worker thread state
static struct spu_worker {
static const void * const worker = NULL;
-#endif // HAVE_PTHREAD || defined(WANT_THREAD_CODE)
+#endif // P_HAVE_PTHREAD || defined(WANT_THREAD_CODE)
////////////////////////////////////////////////////////////////////////
// MAIN SPU FUNCTION
/* special code for TI C64x DSP */
#include "spu_c64x.c"
-#elif HAVE_PTHREAD
+#elif P_HAVE_PTHREAD
#include <pthread.h>
#include <semaphore.h>
worker = NULL;
}
-#else // if !HAVE_PTHREAD
+#else // if !P_HAVE_PTHREAD
static void init_spu_thread(void)
{