Files
Duy Tran Khanh 74cbcc28af Added support for building on Linux (incl. Android/WSL)
This does not require a compatibility layer (Darling) nor a toolchain
(Theos). Instead, clang and lld from Linux distribution is used with
iOS SDK to compile the natives part (C/Objective-C). Of course, this
also allows compiling on Android with Termux or Windows with WSL.
2022-07-28 10:59:56 +07:00

12 lines
402 B
Objective-C

#import <Foundation/Foundation.h>
// This is only compiled when building on non-Apple platforms
int __isPlatformVersionAtLeast(int platform, int major, int minor, int patch) {
NSOperatingSystemVersion version;
version.majorVersion = major;
version.minorVersion = minor;
version.patchVersion = patch;
return [[NSProcessInfo processInfo] isOperatingSystemAtLeastVersion:version];
}