2024-02-24 16:30:38 +01:00
|
|
|
#pragma GCC diagnostic push
|
|
|
|
#pragma GCC diagnostic ignored "-Wold-style-cast"
|
2022-01-11 23:17:26 +01:00
|
|
|
#import <Foundation/Foundation.h>
|
2024-02-24 16:30:38 +01:00
|
|
|
#pragma GCC diagnostic pop
|
2022-01-11 23:17:26 +01: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 17:32:35 +01:00
|
|
|
|
|
|
|
namespace Darwin_ProcessInfo
|
|
|
|
{
|
|
|
|
bool getLowPowerModeEnabled()
|
|
|
|
{
|
|
|
|
return NSProcessInfo.processInfo.isLowPowerModeEnabled;
|
|
|
|
}
|
|
|
|
}
|