(Apple OSX) Swallow 'escape' key being pressed - would previously make the game

go from fullscreen to windowed
This commit is contained in:
twinaphex 2021-04-07 00:47:27 +02:00
parent 412a1885b2
commit ea9f3f13ca

View File

@ -350,6 +350,17 @@ static ui_application_t ui_application_cocoa = {
#define CONVERT_POINT() [[CocoaView get] convertPoint:[event locationInWindow] fromView:nil]
#endif
- (void)keyDown:(NSEvent *)theEvent
{
switch([theEvent keyCode])
{
case 0x35: /* Escape */
break;
default:
[super keyDown:theEvent];
}
}
- (void)sendEvent:(NSEvent *)event {
NSEventType event_type = event.type;