mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 16:39:43 +00:00
fix(macOS): Use correct availability macro check
This commit is contained in:
parent
95500f5631
commit
d8061ac0e9
@ -23,8 +23,8 @@
|
||||
#include "cocoa_common.h"
|
||||
#include "../../ui_companion_driver.h"
|
||||
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_12
|
||||
static const NSEventMask NSEventMaskAny = NSAnyEventMask;
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12
|
||||
#define NSEventMaskAny NSAnyEventMask
|
||||
#endif
|
||||
|
||||
static void* ui_application_cocoa_initialize(void)
|
||||
|
@ -25,10 +25,10 @@
|
||||
|
||||
#include "../../ui_companion_driver.h"
|
||||
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_12
|
||||
static const NSAlertStyle NSAlertStyleCritical = NSCriticalAlertStyle;
|
||||
static const NSAlertStyle NSAlertStyleWarning = NSWarningAlertStyle;
|
||||
static const NSAlertStyle NSAlertStyleInformational = NSInformationalAlertStyle;
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12
|
||||
#define NSAlertStyleCritical NSCriticalAlertStyle
|
||||
#define NSAlertStyleWarning NSWarningAlertStyle
|
||||
#define NSAlertStyleInformational NSInformationalAlertStyle
|
||||
#endif
|
||||
|
||||
static enum ui_msg_window_response ui_msg_window_cocoa_dialog(ui_msg_window_state *state, enum ui_msg_window_type type)
|
||||
|
@ -71,29 +71,29 @@ static void app_terminate(void)
|
||||
|
||||
@implementation RApplication
|
||||
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_12
|
||||
static const NSEventType NSEventTypeKeyDown = NSKeyDown;
|
||||
static const NSEventType NSEventTypeKeyUp = NSKeyUp;
|
||||
static const NSEventType NSEventTypeFlagsChanged = NSFlagsChanged;
|
||||
static const NSEventType NSEventTypeMouseMoved = NSMouseMoved;
|
||||
static const NSEventType NSEventTypeLeftMouseDragged = NSLeftMouseDragged;
|
||||
static const NSEventType NSEventTypeRightMouseDragged = NSRightMouseDragged;
|
||||
static const NSEventType NSEventTypeOtherMouseDragged = NSOtherMouseDragged;
|
||||
static const NSEventType NSEventTypeLeftMouseDown = NSLeftMouseDown;
|
||||
static const NSEventType NSEventTypeRightMouseDown = NSRightMouseDown;
|
||||
static const NSEventType NSEventTypeOtherMouseDown = NSOtherMouseDown;
|
||||
static const NSEventType NSEventTypeLeftMouseUp = NSLeftMouseUp;
|
||||
static const NSEventType NSEventTypeRightMouseUp = NSRightMouseUp;
|
||||
static const NSEventType NSEventTypeOtherMouseUp = NSOtherMouseUp;
|
||||
static const NSEventType NSEventTypeScrollWheel = NSScrollWheel;
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12
|
||||
#define NSEventTypeKeyDown NSKeyDown
|
||||
#define NSEventTypeKeyUp NSKeyUp
|
||||
#define NSEventTypeFlagsChanged NSFlagsChanged
|
||||
#define NSEventTypeMouseMoved NSMouseMoved
|
||||
#define NSEventTypeLeftMouseDragged NSLeftMouseDragged
|
||||
#define NSEventTypeRightMouseDragged NSRightMouseDragged
|
||||
#define NSEventTypeOtherMouseDragged NSOtherMouseDragged
|
||||
#define NSEventTypeLeftMouseDown NSLeftMouseDown
|
||||
#define NSEventTypeRightMouseDown NSRightMouseDown
|
||||
#define NSEventTypeOtherMouseDown NSOtherMouseDown
|
||||
#define NSEventTypeLeftMouseUp NSLeftMouseUp
|
||||
#define NSEventTypeRightMouseUp NSRightMouseUp
|
||||
#define NSEventTypeOtherMouseUp NSOtherMouseUp
|
||||
#define NSEventTypeScrollWheel NSScrollWheel
|
||||
|
||||
// modifier flags
|
||||
static const NSEventModifierFlags NSEventModifierFlagCapsLock = NSAlphaShiftKeyMask;
|
||||
static const NSEventModifierFlags NSEventModifierFlagShift = NSShiftKeyMask;
|
||||
static const NSEventModifierFlags NSEventModifierFlagControl = NSControlKeyMask;
|
||||
static const NSEventModifierFlags NSEventModifierFlagOption = NSAlternateKeyMask;
|
||||
static const NSEventModifierFlags NSEventModifierFlagCommand = NSCommandKeyMask;
|
||||
static const NSEventModifierFlags NSEventModifierFlagNumericPad= NSNumericPadKeyMask;
|
||||
#define NSEventModifierFlagCapsLock NSAlphaShiftKeyMask
|
||||
#define NSEventModifierFlagShift NSShiftKeyMask
|
||||
#define NSEventModifierFlagControl NSControlKeyMask
|
||||
#define NSEventModifierFlagOption NSAlternateKeyMask
|
||||
#define NSEventModifierFlagCommand NSCommandKeyMask
|
||||
#define NSEventModifierFlagNumericPad NSNumericPadKeyMask
|
||||
#endif
|
||||
|
||||
- (void)sendEvent:(NSEvent *)event
|
||||
|
Loading…
Reference in New Issue
Block a user