forked from mirror/smcFanControl
On Apple Silicon set the fan to Auto before sleeping. systemDidWakeFromSleep will set the previous selection on wake
This commit is contained in:
@ -22,6 +22,9 @@
|
||||
|
||||
#import "MachineDefaults.h"
|
||||
#import "NSFileManager+DirectoryLocations.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <mach/machine.h>
|
||||
|
||||
@interface MachineDefaults ()
|
||||
{
|
||||
@ -123,6 +126,14 @@
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user