From 2b385f28f0010a2c1d273ae78adb820efdab829b Mon Sep 17 00:00:00 2001 From: nastys <7950891+nastys@users.noreply.github.com> Date: Sat, 24 Feb 2024 15:15:19 +0100 Subject: [PATCH] Block Rosetta on macOS 14.0, 14.1, and 14.2 (#15237) --- rpcs3/main.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/rpcs3/main.cpp b/rpcs3/main.cpp index 349db34673df..c4546ae770de 100644 --- a/rpcs3/main.cpp +++ b/rpcs3/main.cpp @@ -60,6 +60,13 @@ DYNAMIC_IMPORT("ntdll.dll", NtSetTimerResolution, NTSTATUS(ULONG DesiredResoluti #if defined(__APPLE__) #include +// sysinfo_darwin.mm +namespace Darwin_Version +{ + extern int getNSmajorVersion(); + extern int getNSminorVersion(); + extern int getNSpatchVersion(); +} #endif #include "Utilities/Config.h" @@ -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)