mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Move WindowListener around
This commit is contained in:
parent
c7ce2c7053
commit
947e15f34f
@ -1,15 +1,41 @@
|
||||
#ifndef COCOA_APPLE_PLATFORM_H
|
||||
#define COCOA_APPLE_PLATFORM_H
|
||||
|
||||
#if defined(HAVE_COCOA_METAL)
|
||||
#import <Metal/Metal.h>
|
||||
#import <MetalKit/MetalKit.h>
|
||||
|
||||
@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
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_COCOA_METAL)
|
||||
id<ApplePlatform> apple_platform;
|
||||
@interface RetroArch_OSX : NSObject <ApplePlatform, NSApplicationDelegate>
|
||||
{
|
||||
NSWindow* _window;
|
||||
apple_view_type_t _vt;
|
||||
NSView* _renderView;
|
||||
id _sleepActivity;
|
||||
WindowListener *_listener;
|
||||
NSWindow *_window;
|
||||
apple_view_type_t _vt;
|
||||
NSView *_renderView;
|
||||
id _sleepActivity;
|
||||
WindowListener *_listener;
|
||||
}
|
||||
#elif defined(HAVE_COCOA)
|
||||
id apple_platform;
|
||||
@ -19,11 +45,11 @@ id apple_platform;
|
||||
@interface RetroArch_OSX : NSObject <NSApplicationDelegate>
|
||||
#endif
|
||||
{
|
||||
NSWindow* _window;
|
||||
NSWindow *_window;
|
||||
}
|
||||
#endif
|
||||
|
||||
@property (nonatomic, retain) NSWindow IBOutlet* window;
|
||||
@property(nonatomic, retain) NSWindow IBOutlet *window;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -40,29 +40,6 @@
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
#include ".././verbosity.h"
|
||||
|
||||
#if defined(HAVE_COCOA_METAL)
|
||||
#import <Metal/Metal.h>
|
||||
#import <MetalKit/MetalKit.h>
|
||||
|
||||
@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
|
||||
#endif
|
||||
|
||||
#include "cocoa/apple_platform.h"
|
||||
|
||||
static void app_terminate(void)
|
||||
@ -151,7 +128,7 @@ static void app_terminate(void)
|
||||
apple = (cocoa_input_data_t*)input_driver_get_data();
|
||||
if (!apple)
|
||||
return;
|
||||
|
||||
|
||||
pos.x = 0;
|
||||
pos.y = 0;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user