UI: Use libobs rosetta detection
parent
3b64e74660
commit
0fa7834bfc
|
@ -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
|
||||
|
|
|
@ -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) {}
|
||||
|
|
|
@ -85,5 +85,4 @@ void EnableOSXDockIcon(bool enable);
|
|||
bool isInBundle();
|
||||
void InstallNSApplicationSubclass();
|
||||
void disableColorSpaceConversion(QWidget *window);
|
||||
bool ProcessIsRosettaTranslated();
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue