equal
deleted
inserted
replaced
22 #include "SDL_mixer.h" |
22 #include "SDL_mixer.h" |
23 #include "hwconsts.h" |
23 #include "hwconsts.h" |
24 |
24 |
25 #include <QApplication> |
25 #include <QApplication> |
26 |
26 |
|
27 #ifdef __APPLE__ |
|
28 #include "CocoaInitializer.h" |
|
29 #endif |
|
30 |
27 |
31 |
28 extern char sdlkeys[1024][2][128]; |
32 extern char sdlkeys[1024][2][128]; |
29 extern char xb360buttons[][128]; |
33 extern char xb360buttons[][128]; |
30 extern char xb360dpad[128]; |
34 extern char xb360dpad[128]; |
31 extern char xbox360axes[][128]; |
35 extern char xbox360axes[][128]; |
32 |
36 |
33 |
37 |
34 SDLInteraction::SDLInteraction() |
38 SDLInteraction::SDLInteraction() |
35 { |
39 { |
36 |
40 #ifdef __APPLE__ |
|
41 // SDL_Init needs a NSAutoreleasePool set up |
|
42 CocoaInitializer initializer; |
|
43 #endif |
|
44 |
37 SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK); |
45 SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK); |
38 |
46 |
39 musicInitialized = 0; |
47 musicInitialized = 0; |
40 music = NULL; |
48 music = NULL; |
41 if(SDL_NumJoysticks()) |
49 if(SDL_NumJoysticks()) |