mirror of
https://github.com/libretro/RetroArch
synced 2025-01-29 00:32:49 +00:00
chore(cocoa): Remove Gestalt compiler warnings for macOS 10.13+
This commit is contained in:
parent
3919ac7c7d
commit
98e6adcfca
@ -292,6 +292,12 @@ static void frontend_darwin_get_os(char *s, size_t len, int *major, int *minor)
|
||||
get_ios_version(major, minor);
|
||||
strlcpy(s, "iOS", len);
|
||||
#elif defined(OSX)
|
||||
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 101300 // MAC_OS_X_VERSION_10_13
|
||||
NSOperatingSystemVersion version = NSProcessInfo.processInfo.operatingSystemVersion;
|
||||
*major = (int)version.majorVersion;
|
||||
*minor = (int)version.minorVersion;
|
||||
#else
|
||||
if ([[NSProcessInfo processInfo] respondsToSelector:@selector(operatingSystemVersion)])
|
||||
{
|
||||
typedef struct
|
||||
@ -309,6 +315,7 @@ static void frontend_darwin_get_os(char *s, size_t len, int *major, int *minor)
|
||||
Gestalt(gestaltSystemVersionMinor, (SInt32*)minor);
|
||||
Gestalt(gestaltSystemVersionMajor, (SInt32*)major);
|
||||
}
|
||||
#endif
|
||||
strlcpy(s, "OSX", len);
|
||||
#endif
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user