From 261e52b7dd35e8fd2c8b1f760a3ba4cf7fce60c5 Mon Sep 17 00:00:00 2001 From: Alexander Kozharsky Date: Mon, 16 Sep 2024 23:19:48 +0300 Subject: [PATCH] Fix for Apple OS detection on VM region shifting set. (#911) * Fix macOS detection for VM regions shifting. * libretro: fixed macOS detection. --- libretro.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libretro.cpp b/libretro.cpp index 53c2103d5..2b33079ac 100644 --- a/libretro.cpp +++ b/libretro.cpp @@ -56,10 +56,14 @@ retro_input_state_t dbg_input_state_cb = 0; #endif /* HAVE_LIGHTREC */ #if __APPLE__ +#include +#if TARGET_OS_OSX #include #include +#define __MACOS__ 1 #define MACOS_VM_BASE (SHARED_REGION_BASE+SHARED_REGION_SIZE+ATTR_VOL_RESERVED_SIZE) #endif +#endif //Fast Save States exclude string labels from variables in the savestate, and are at least 20% faster. extern "C" { @@ -1675,7 +1679,7 @@ static void SetDiscWrapper(const bool CD_TrayOpen) { #endif static const uintptr_t supported_io_bases[] = { -#if !__APPLE__ +#if !__MACOS__ static_cast(0x00000000), static_cast(0x10000000), static_cast(0x20000000),