(Metal/WindowListener) Fix duplicate symbol errors by

moving implementation of WindowListener to cocoa_common.m
This commit is contained in:
twinaphex 2021-01-24 03:11:13 +01:00
parent 7ea1d7d0da
commit dbbf557954
2 changed files with 13 additions and 11 deletions

View File

@ -8,20 +8,9 @@
#if defined(HAVE_COCOA_METAL) && !defined(HAVE_COCOATOUCH) #if defined(HAVE_COCOA_METAL) && !defined(HAVE_COCOATOUCH)
@interface WindowListener : NSResponder<NSWindowDelegate> @interface WindowListener : NSResponder<NSWindowDelegate>
@end
@implementation WindowListener
/* Similarly to SDL, we'll respond to key events by doing nothing so we don't beep.
*/
- (void)flagsChanged:(NSEvent *)event { }
- (void)keyDown:(NSEvent *)event { }
- (void)keyUp:(NSEvent *)event { }
@end @end
#endif #endif
#if defined(HAVE_COCOA_METAL) || defined(HAVE_COCOATOUCH) #if defined(HAVE_COCOA_METAL) || defined(HAVE_COCOATOUCH)
@protocol ApplePlatform @protocol ApplePlatform

View File

@ -553,3 +553,16 @@ bool cocoa_get_metrics(
return true; return true;
} }
#endif #endif
#if defined(HAVE_COCOA_METAL) && !defined(HAVE_COCOATOUCH)
@implementation WindowListener
/* Similarly to SDL, we'll respond to key events
* by doing nothing so we don't beep.
*/
- (void)flagsChanged:(NSEvent *)event { }
- (void)keyDown:(NSEvent *)event { }
- (void)keyUp:(NSEvent *)event { }
@end
#endif