mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 00:20:01 +00:00
Start using raw constants for OSX version detection
This commit is contained in:
parent
f35b578c42
commit
ab34a70873
@ -286,17 +286,13 @@ static void frontend_darwin_get_name(char *s, size_t len)
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef MAC_OS_X_VERSION_10_10
|
||||
#define MAC_OS_X_VERSION_10_10 101000
|
||||
#endif
|
||||
|
||||
static void frontend_darwin_get_os(char *s, size_t len, int *major, int *minor)
|
||||
{
|
||||
#if defined(IOS)
|
||||
get_ios_version(major, minor);
|
||||
strlcpy(s, "iOS", len);
|
||||
#elif defined(OSX)
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
|
||||
NSOperatingSystemVersion version = [[NSProcessInfo processInfo] operatingSystemVersion];
|
||||
*major = (int)version.majorVersion;
|
||||
*minor = (int)version.minorVersion;
|
||||
|
@ -365,7 +365,7 @@ static bool cocoagl_gfx_ctx_set_video_mode(void *data,
|
||||
|
||||
g_format = [[NSOpenGLPixelFormat alloc] initWithAttributes:attributes];
|
||||
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1050
|
||||
if (g_format == nil)
|
||||
{
|
||||
/* NSOpenGLFPAAllowOfflineRenderers is
|
||||
|
@ -404,10 +404,6 @@ static void cocoagl_gfx_ctx_show_mouse(void *data, bool state)
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef MAC_OS_X_VERSION_10_10
|
||||
#define MAC_OS_X_VERSION_10_10 101000
|
||||
#endif
|
||||
|
||||
static bool cocoagl_gfx_ctx_set_video_mode(void *data,
|
||||
video_frame_info_t *video_info,
|
||||
unsigned width, unsigned height, bool fullscreen)
|
||||
@ -450,7 +446,7 @@ static bool cocoagl_gfx_ctx_set_video_mode(void *data,
|
||||
}
|
||||
#endif
|
||||
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
|
||||
if (g_major == 4 && g_minor == 1)
|
||||
{
|
||||
attributes[6] = NSOpenGLPFAOpenGLProfile;
|
||||
@ -460,7 +456,7 @@ static bool cocoagl_gfx_ctx_set_video_mode(void *data,
|
||||
|
||||
g_format = [[NSOpenGLPixelFormat alloc] initWithAttributes:attributes];
|
||||
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1050
|
||||
if (g_format == nil)
|
||||
{
|
||||
/* NSOpenGLFPAAllowOfflineRenderers is
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
#ifdef __OBJC__
|
||||
|
||||
#if (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4)
|
||||
#if (MAC_OS_X_VERSION_MAX_ALLOWED <= 1040)
|
||||
typedef int NSInteger;
|
||||
typedef unsigned NSUInteger;
|
||||
typedef float CGFloat;
|
||||
|
@ -42,11 +42,7 @@
|
||||
#import <MetalKit/MetalKit.h>
|
||||
#endif
|
||||
|
||||
#ifndef MAC_OS_X_VERSION_10_6
|
||||
#define MAC_OS_X_VERSION_10_6 1060
|
||||
#endif
|
||||
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
|
||||
@interface WindowListener : NSResponder<NSWindowDelegate>
|
||||
@end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user