I am trying to check if my program is running under emulation on an m1 machine. The code I am using is below
declare function sysctlbyname lib “/usr/lib/libSystem.dylib” (name as cString, out as ptr, byref size as Uinteger, newP as ptr, newPSize as Uinteger) as integer
Dim sizeInfo as Uinteger
Dim r as integer
r=sysctlbyname( “sysctl.proc_translated”, nil, sizeInfo, nil, 0 )
it returns 0 which is correct, but I have no way of knowing if it is running under rosetta since I am testing on a Mac mini m1 so it always returns 0.
I tried using Get info but I see no options for the app to use rosetta, so I don’t know if the code I am
using is correct. Under emulation it should return 1.
Any help would be appreciated