QTfrontend/SDLs.cpp
changeset 5083 b0b560f561b5
parent 4976 088d40d8aba2
child 5085 e8944ed92b61
--- a/QTfrontend/SDLs.cpp	Sat Apr 02 12:52:19 2011 -0400
+++ b/QTfrontend/SDLs.cpp	Sun Apr 03 00:13:38 2011 -0400
@@ -24,6 +24,10 @@
 
 #include <QApplication>
 
+#ifdef __APPLE__
+#include "CocoaInitializer.h"
+#endif
+
 
 extern char sdlkeys[1024][2][128];
 extern char xb360buttons[][128];
@@ -33,7 +37,11 @@
 
 SDLInteraction::SDLInteraction()
 {
-
+#ifdef __APPLE__
+    // SDL_Init needs a NSAutoreleasePool set up
+    CocoaInitializer initializer;
+#endif
+    
     SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK);
 
     musicInitialized = 0;