CheckReturn should not be here.

This commit is contained in:
UnknownShadow200 2015-11-04 10:24:50 +11:00
parent fda3d68753
commit d76112a47a
2 changed files with 5 additions and 6 deletions

View File

@ -490,11 +490,6 @@ namespace OpenTK.Platform.MacOS.Carbon
[DllImport(carbon)]
static extern void ReleaseEvent(IntPtr theEvent);
internal static void SendEvent(IntPtr theEvent) {
IntPtr theTarget = GetEventDispatcherTarget();
SendEventToEventTarget(theEvent, theTarget);
}
// Processes events in the queue and then returns.
internal static void ProcessEvents() {
IntPtr theEvent;
@ -600,7 +595,7 @@ namespace OpenTK.Platform.MacOS.Carbon
OSStatus result = API.GetEventParameter(inEvent,
EventParamName.WindowRef, EventParamType.typeWindowRef, IntPtr.Zero,
sizeof(IntPtr), IntPtr.Zero, (IntPtr)(void*)&retval);
CheckReturn(result);
//CheckReturn(result);
windowRef = retval;
return result;
}

View File

@ -223,6 +223,10 @@ namespace OpenTK.Platform.MacOS {
GetCharCodes(inEvent, out code, out charCode);
keyPressArgs.KeyChar = charCode;
break;
}
if( !Keymap.ContainsKey( code ) ) {
Debug.Print( "{0} is not mapped, ignoring" );
return OSStatus.NoError;
}
switch ((KeyboardEventKind)evt.EventKind) {