mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 09:09:52 -06:00
Start work of OSX keyboard input, doesn't work, so it's currently disabled, but it's a beginning. Also changed variable 'id' to 'cid' because id is a object type in Obj-C, which I was running in to problems with, kept it that way just in case.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5269 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -0,0 +1,38 @@
|
||||
#import <AppKit/NSWindow.h>
|
||||
#import <AppKit/NSView.h>
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
#include "OSXPrivate.h"
|
||||
NSWindow* m_Window;
|
||||
void OSX_Init(void *_View)
|
||||
{
|
||||
// _View is really a wxNSView
|
||||
//m_Window is really a wxNSWindow
|
||||
NSView *View = (NSView*)_View;
|
||||
m_Window = [View window];
|
||||
}
|
||||
|
||||
void OSX_UpdateKeys( int max, char* keys )
|
||||
{
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
NSEvent *event = [[NSEvent alloc] init];
|
||||
|
||||
/*event = [m_Window nextEventMatchingMask:NSAnyEventMask untilDate:[NSDate distantPast] inMode:NSDefaultRunLoopMode dequeue:YES ];
|
||||
|
||||
if ( event != nil ) {
|
||||
switch ([event type]) {
|
||||
case NSKeyDown:
|
||||
//case NSKeyUp:
|
||||
//case NSFlagsChanged: // For Command
|
||||
memcpy(keys, [[event characters] UTF8String], max);
|
||||
break;
|
||||
default:
|
||||
[m_Window sendEvent:event];
|
||||
break;
|
||||
}
|
||||
}*/
|
||||
|
||||
[event release];
|
||||
[pool release];
|
||||
}
|
Reference in New Issue
Block a user