Don't init audio if unused
This commit is contained in:
@@ -25,7 +25,12 @@ namespace lime {
|
||||
|
||||
SDLApplication::SDLApplication () {
|
||||
|
||||
if (SDL_Init (SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_GAMECONTROLLER | SDL_INIT_TIMER | SDL_INIT_JOYSTICK) != 0) {
|
||||
Uint32 initFlags = SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_GAMECONTROLLER | SDL_INIT_TIMER | SDL_INIT_JOYSTICK;
|
||||
#if defined(LIME_MOJOAL) || defined(LIME_OPENALSOFT)
|
||||
initFlags &= SDL_INIT_AUDIO;
|
||||
#endif
|
||||
|
||||
if (SDL_Init (initFlags) != 0) {
|
||||
|
||||
printf ("Could not initialize SDL: %s.\n", SDL_GetError ());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user