Skip to content

Commit

Permalink
Fix for Apple OS detection on VM region shifting set. (#911)
Browse files Browse the repository at this point in the history
* Fix macOS detection for VM regions shifting.

* libretro: fixed macOS detection.
  • Loading branch information
kozharskyad committed Sep 16, 2024
1 parent ca2cfc2 commit 261e52b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion libretro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,14 @@ retro_input_state_t dbg_input_state_cb = 0;
#endif /* HAVE_LIGHTREC */

#if __APPLE__
#include <TargetConditionals.h>
#if TARGET_OS_OSX
#include <mach/shared_region.h>
#include <sys/attr.h>
#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" {
Expand Down Expand Up @@ -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<uintptr_t>(0x00000000),
static_cast<uintptr_t>(0x10000000),
static_cast<uintptr_t>(0x20000000),
Expand Down

0 comments on commit 261e52b

Please sign in to comment.