replaced confusing ifdef with a more concise #if TARGET_OS_OSX

This commit is contained in:
Yoshi Sugawara 2020-07-19 07:57:10 -10:00
parent 3dc716299f
commit 42e4854245
2 changed files with 4 additions and 4 deletions

View File

@ -114,7 +114,7 @@ typedef struct
} apple_frontend_settings_t; } apple_frontend_settings_t;
extern apple_frontend_settings_t apple_frontend_settings; extern apple_frontend_settings_t apple_frontend_settings;
#if !defined(HAVE_COCOATOUCH) && (defined(HAVE_COCOA) || defined(HAVE_COCOA_METAL)) #if TARGET_OS_OSX
#include <AppKit/AppKit.h> #include <AppKit/AppKit.h>
@interface CocoaView : NSView @interface CocoaView : NSView

View File

@ -55,7 +55,7 @@ void *glkitview_init(void);
} }
#endif #endif
#if !defined(HAVE_COCOATOUCH) && (defined(HAVE_COCOA) || defined(HAVE_COCOA_METAL)) #if TARGET_OS_OSX
- (void)scrollWheel:(NSEvent *)theEvent { - (void)scrollWheel:(NSEvent *)theEvent {
cocoa_input_data_t *apple = (cocoa_input_data_t*)input_driver_get_data(); cocoa_input_data_t *apple = (cocoa_input_data_t*)input_driver_get_data();
(void)apple; (void)apple;
@ -77,7 +77,7 @@ void *glkitview_init(void);
{ {
self = [super init]; self = [super init];
#if !defined(HAVE_COCOATOUCH) && (defined(HAVE_COCOA) || defined(HAVE_COCOA_METAL)) #if TARGET_OS_OSX
[self setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable]; [self setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
#endif #endif
@ -115,7 +115,7 @@ void *glkitview_init(void);
return self; return self;
} }
#if !defined(HAVE_COCOATOUCH) && (defined(HAVE_COCOA) || defined(HAVE_COCOA_METAL)) #if TARGET_OS_OSX
- (void)setFrame:(NSRect)frameRect - (void)setFrame:(NSRect)frameRect
{ {
[super setFrame:frameRect]; [super setFrame:frameRect];