Browse Source

UI: Use libobs rosetta detection

gxalpha 3 years ago
parent
commit
0fa7834bfc
3 changed files with 1 additions and 15 deletions
  1. 1 1
      UI/obs-app.cpp
  2. 0 13
      UI/platform-osx.mm
  3. 0 1
      UI/platform.hpp

+ 1 - 1
UI/obs-app.cpp

@@ -2173,7 +2173,7 @@ static int run_program(fstream &logFile, int argc, char *argv[])
 		}
 
 #ifdef __APPLE__
-		bool rosettaTranslated = ProcessIsRosettaTranslated();
+		bool rosettaTranslated = os_get_emulation_status();
 		blog(LOG_INFO, "Rosetta translation used: %s",
 		     rosettaTranslated ? "true" : "false");
 #endif

+ 0 - 13
UI/platform-osx.mm

@@ -202,19 +202,6 @@ void EnableOSXDockIcon(bool enable)
 				NSApplicationActivationPolicyProhibited];
 }
 
-bool ProcessIsRosettaTranslated()
-{
-#ifdef __aarch64__
-	return false;
-#else
-	int ret = 0;
-	size_t size = sizeof(ret);
-	if (sysctlbyname("sysctl.proc_translated", &ret, &size, NULL, 0) == -1)
-		return false;
-	return ret == 1;
-#endif
-}
-
 // Not implemented yet
 void TaskbarOverlayInit() {}
 void TaskbarOverlaySetStatus(TaskbarOverlayStatus) {}

+ 0 - 1
UI/platform.hpp

@@ -85,5 +85,4 @@ void EnableOSXDockIcon(bool enable);
 bool isInBundle();
 void InstallNSApplicationSubclass();
 void disableColorSpaceConversion(QWidget *window);
-bool ProcessIsRosettaTranslated();
 #endif