Skip to content

Commit

Permalink
Block Rosetta on macOS 14.0, 14.1, and 14.2 (#15237)
Browse files Browse the repository at this point in the history
  • Loading branch information
nastys authored Feb 24, 2024
1 parent ac8e914 commit 2b385f2
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions rpcs3/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ DYNAMIC_IMPORT("ntdll.dll", NtSetTimerResolution, NTSTATUS(ULONG DesiredResoluti

#if defined(__APPLE__)
#include <dispatch/dispatch.h>
// sysinfo_darwin.mm
namespace Darwin_Version
{
extern int getNSmajorVersion();
extern int getNSminorVersion();
extern int getNSpatchVersion();
}
#endif

#include "Utilities/Config.h"
Expand Down Expand Up @@ -519,6 +526,13 @@ int main(int argc, char** argv)
}
#endif

#ifdef __APPLE__
if ((Darwin_Version::getNSmajorVersion() == 14 && Darwin_Version::getNSminorVersion() < 3) && (utils::get_cpu_brand().rfind("VirtualApple", 0) == 0))
{
report_fatal_error("Unsupported Rosetta version.\nPlease update macOS to a supported version.");
}
#endif

ensure(thread_ctrl::is_main(), "Not main thread");

// Initialize TSC freq (in case it isn't)
Expand Down

0 comments on commit 2b385f2

Please sign in to comment.