mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-14 19:15:05 -05:00
split macos platform
This commit is contained in:
parent
d0c6629ea3
commit
47e7f8308a
3 changed files with 19 additions and 9 deletions
|
@ -55,15 +55,16 @@
|
|||
#define GEODE_IS_DESKTOP
|
||||
#define GEODE_PLATFORM_NAME "MacOS"
|
||||
#define GEODE_PLATFORM_EXTENSION ".dylib"
|
||||
#define GEODE_PLATFORM_SHORT_IDENTIFIER "mac"
|
||||
#define CC_TARGET_OS_MAC
|
||||
|
||||
#if TARGET_CPU_ARM64
|
||||
#define GEODE_IS_ARM_MAC
|
||||
#define GEODE_PLATFORM_SHORT_IDENTIFIER "mac-arm"
|
||||
#define GEODE_ARM_MAC(...) __VA_ARGS__
|
||||
#define GEODE_INTEL_MAC(...)
|
||||
#else
|
||||
#define GEODE_IS_INTEL_MAC
|
||||
#define GEODE_PLATFORM_SHORT_IDENTIFIER "mac-intel"
|
||||
#define GEODE_ARM_MAC(...)
|
||||
#define GEODE_INTEL_MAC(...) __VA_ARGS__
|
||||
#endif
|
||||
|
|
|
@ -116,7 +116,8 @@ namespace geode {
|
|||
enum {
|
||||
Unknown = -1,
|
||||
Windows,
|
||||
MacOS,
|
||||
MacIntel,
|
||||
MacArm,
|
||||
iOS,
|
||||
Android32,
|
||||
Android64,
|
||||
|
@ -167,7 +168,8 @@ namespace geode {
|
|||
switch (lp) {
|
||||
case Unknown: return "Unknown";
|
||||
case Windows: return "Windows";
|
||||
case MacOS: return "MacOS";
|
||||
case MacIntel: return "MacIntel";
|
||||
case MacArm: return "MacArm";
|
||||
case iOS: return "iOS";
|
||||
case Android32: return "Android32";
|
||||
case Android64: return "Android64";
|
||||
|
@ -181,7 +183,8 @@ namespace geode {
|
|||
switch (lp) {
|
||||
case Unknown: return "unknown";
|
||||
case Windows: return "win";
|
||||
case MacOS: return "mac";
|
||||
case MacIntel: return ignoreArch ? "mac" : "mac-intel";
|
||||
case MacArm: return ignoreArch ? "mac" : "mac-arm";
|
||||
case iOS: return "ios";
|
||||
case Android32: return ignoreArch ? "android" : "android32";
|
||||
case Android64: return ignoreArch ? "android" : "android64";
|
||||
|
@ -220,8 +223,10 @@ namespace std {
|
|||
|
||||
#ifdef GEODE_IS_WINDOWS
|
||||
#define GEODE_PLATFORM_TARGET PlatformID::Windows
|
||||
#elif defined(GEODE_IS_MACOS)
|
||||
#define GEODE_PLATFORM_TARGET PlatformID::MacOS
|
||||
#elif defined(GEODE_IS_ARM_MAC)
|
||||
#define GEODE_PLATFORM_TARGET PlatformID::MacArm
|
||||
#elif defined(GEODE_IS_INTEL_MAC)
|
||||
#define GEODE_PLATFORM_TARGET PlatformID::MacIntel
|
||||
#elif defined(GEODE_IS_IOS)
|
||||
#define GEODE_PLATFORM_TARGET PlatformID::iOS
|
||||
#elif defined(GEODE_IS_ANDROID32)
|
||||
|
|
|
@ -10,9 +10,13 @@ PlatformID PlatformID::from(const char* str) {
|
|||
case hash("Windows"):
|
||||
case hash("windows"): return PlatformID::Windows;
|
||||
|
||||
case hash("mac"):
|
||||
case hash("MacOS"):
|
||||
case hash("macos"): return PlatformID::MacOS;
|
||||
case hash("mac-intel"):
|
||||
case hash("imac"):
|
||||
case hash("MacIntel"): return PlatformID::MacIntel;
|
||||
|
||||
case hash("m1"):
|
||||
case hash("mac-arm"):
|
||||
case hash("MacArm"): return PlatformID::MacArm;
|
||||
|
||||
case hash("iOS"):
|
||||
case hash("ios"): return PlatformID::iOS;
|
||||
|
|
Loading…
Reference in a new issue