mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-02-24 12:57:00 +00:00
[Mac] Remove call to NewEventHandlerUPP
NewEventHandlerUPP fails to load when running through MonoKickstart. It appears that this function is only used for old PPC systems that had trouble with function pointers - sample code online indicates that we do not need to call this.
This commit is contained in:
parent
cf3a30d024
commit
88a60b14c5
|
@ -32,6 +32,7 @@ using System.Collections.Generic;
|
|||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using OpenTK.Graphics;
|
||||
using OpenTK.Input;
|
||||
|
@ -179,7 +180,7 @@ namespace OpenTK.Platform.MacOS
|
|||
{
|
||||
Debug.Print("Creating window...");
|
||||
Debug.Indent();
|
||||
|
||||
|
||||
IntPtr windowRef = API.CreateNewWindow(@class, attrib, r);
|
||||
API.SetWindowTitle(windowRef, title);
|
||||
|
||||
|
@ -230,13 +231,13 @@ namespace OpenTK.Platform.MacOS
|
|||
//new EventTypeSpec(EventClass.Keyboard, KeyboardEventKind.RawKeyUp),
|
||||
//new EventTypeSpec(EventClass.Keyboard, KeyboardEventKind.RawKeyModifiersChanged),
|
||||
};
|
||||
|
||||
|
||||
MacOSEventHandler handler = EventHandler;
|
||||
uppHandler = API.NewEventHandlerUPP(handler);
|
||||
|
||||
uppHandler = Marshal.GetFunctionPointerForDelegate(handler);
|
||||
|
||||
API.InstallWindowEventHandler(window.Handle, uppHandler, eventTypes,
|
||||
window.Handle, IntPtr.Zero);
|
||||
|
||||
|
||||
Application.WindowEventHandler = this;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue