2024-02-24 15:30:38 +00:00
|
|
|
#pragma GCC diagnostic push
|
|
|
|
#pragma GCC diagnostic ignored "-Wold-style-cast"
|
2022-01-11 22:17:26 +00:00
|
|
|
#import <Foundation/Foundation.h>
|
2024-02-24 15:30:38 +00:00
|
|
|
#pragma GCC diagnostic pop
|
2022-01-11 22:17:26 +00:00
|
|
|
|
|
|
|
namespace Darwin_Version
|
|
|
|
{
|
|
|
|
NSOperatingSystemVersion osver = NSProcessInfo.processInfo.operatingSystemVersion;
|
|
|
|
|
|
|
|
int getNSmajorVersion()
|
|
|
|
{
|
|
|
|
return osver.majorVersion;
|
|
|
|
}
|
|
|
|
|
|
|
|
int getNSminorVersion()
|
|
|
|
{
|
|
|
|
return osver.minorVersion;
|
|
|
|
}
|
|
|
|
|
|
|
|
int getNSpatchVersion()
|
|
|
|
{
|
|
|
|
return osver.patchVersion;
|
|
|
|
}
|
|
|
|
}
|
2022-03-05 16:32:35 +00:00
|
|
|
|
|
|
|
namespace Darwin_ProcessInfo
|
|
|
|
{
|
|
|
|
bool getLowPowerModeEnabled()
|
|
|
|
{
|
|
|
|
return NSProcessInfo.processInfo.isLowPowerModeEnabled;
|
|
|
|
}
|
|
|
|
}
|