For Apple Silicon use the temperature sensors from IOKIT

This commit is contained in:
Raafat Akkad
2022-12-02 23:34:35 +00:00
parent 71c252571f
commit 346eceb501
8 changed files with 150 additions and 22 deletions

View File

@ -22,9 +22,6 @@
#import "MachineDefaults.h"
#import "NSFileManager+DirectoryLocations.h"
#include <sys/types.h>
#include <sys/sysctl.h>
#include <mach/machine.h>
@interface MachineDefaults ()
{
@ -126,14 +123,6 @@
return defaultsDict;
}
+ (BOOL)isAppleSilicon
{
cpu_type_t cpu_type;
size_t size = sizeof(cpu_type);
sysctlbyname("hw.cputype", &cpu_type, &size, NULL, 0);
return cpu_type == CPU_TYPE_ARM64;
}
+ (NSString *)computerModel
{
static NSString *computerModel = nil;