adding combined macOS iOS version guards
This commit is contained in:
parent
7812657cbf
commit
6833b0e934
@ -18,6 +18,9 @@
|
||||
#define WX_IS_MACOS_AVAILABLE(major, minor) \
|
||||
__builtin_available(macOS major ## . ## minor, *)
|
||||
|
||||
#define WX_IS_MACOS_OR_IOS_AVAILABLE(macmajor, macminor, imajor, iminor) \
|
||||
__builtin_available(macOS macmajor ## . ## macminor, iOS imajor ##. ## iminor, *)
|
||||
|
||||
#define WX_IS_MACOS_AVAILABLE_FULL(major, minor, micro) \
|
||||
__builtin_available(macOS major ## . ## minor ## . ## micro, *)
|
||||
|
||||
@ -31,6 +34,14 @@
|
||||
#define WX_IS_MACOS_AVAILABLE(major, minor) \
|
||||
wxPlatformInfo::Get().CheckOSVersion(major, minor)
|
||||
|
||||
#ifdef wxOSX_USE_IPHONE
|
||||
#define WX_IS_MACOS_OR_IOS_AVAILABLE(macmajor, macminor, imajor, iminor) \
|
||||
wxPlatformInfo::Get().CheckOSVersion(imajor, iminor)
|
||||
#else
|
||||
#define WX_IS_MACOS_OR_IOS_AVAILABLE(macmajor, macminor, imajor, iminor) \
|
||||
wxPlatformInfo::Get().CheckOSVersion(macmajor, macminor)
|
||||
#endif
|
||||
|
||||
#define WX_IS_MACOS_AVAILABLE_FULL(major, minor, micro) \
|
||||
wxPlatformInfo::Get().CheckOSVersion(major, minor, micro)
|
||||
|
||||
|
@ -118,7 +118,7 @@ wxCGColorRefData::wxCGColorRefData(CGColorRef col)
|
||||
}
|
||||
else if (model != kCGColorSpaceModelRGB)
|
||||
{
|
||||
if ( WX_IS_MACOS_AVAILABLE(10, 11) )
|
||||
if ( WX_IS_MACOS_OR_IOS_AVAILABLE(10, 11, 9, 0) )
|
||||
{
|
||||
rgbacol = CGColorCreateCopyByMatchingToColorSpace(wxMacGetGenericRGBColorSpace(), kCGRenderingIntentDefault, col, NULL);
|
||||
noComp = CGColorGetNumberOfComponents(rgbacol);
|
||||
|
Loading…
Reference in New Issue
Block a user