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