[Mac] Ensure Cocoa bindings are initialized first

This commit is contained in:
thefiddler 2014-07-23 14:35:51 +02:00
parent 6abca6ddf7
commit ac2ae4a4bb

View file

@ -41,8 +41,12 @@ namespace OpenTK.Platform.MacOS
static readonly IntPtr selQuit = Selector.Get("quit");
internal static void Initialize()
internal static void Initialize() { }
static NSApplication()
{
Cocoa.Initialize();
// Create the NSAutoreleasePool
AutoreleasePool = Cocoa.SendIntPtr(Cocoa.SendIntPtr(Class.NSAutoreleasePool, Selector.Alloc), Selector.Init);