Mercurial > sdl-ios-xcode
comparison src/SDL.c @ 1909:8f1ab2f7c722
Look at environment variables in SDL_VideoInit() and SDL_AudioInit()
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 15 Jul 2006 19:30:18 +0000 |
parents | c121d94672cb |
children | 3f73c88c9abb f1d07ba2e275 0906692aa6a4 |
comparison
equal
deleted
inserted
replaced
1908:e079dafea2bf | 1909:8f1ab2f7c722 |
---|---|
60 SDL_InitSubSystem(Uint32 flags) | 60 SDL_InitSubSystem(Uint32 flags) |
61 { | 61 { |
62 #if !SDL_VIDEO_DISABLED | 62 #if !SDL_VIDEO_DISABLED |
63 /* Initialize the video/event subsystem */ | 63 /* Initialize the video/event subsystem */ |
64 if ((flags & SDL_INIT_VIDEO) && !(SDL_initialized & SDL_INIT_VIDEO)) { | 64 if ((flags & SDL_INIT_VIDEO) && !(SDL_initialized & SDL_INIT_VIDEO)) { |
65 if (SDL_VideoInit(SDL_getenv("SDL_VIDEODRIVER"), | 65 if (SDL_VideoInit(NULL, (flags & SDL_INIT_EVENTTHREAD)) < 0) { |
66 (flags & SDL_INIT_EVENTTHREAD)) < 0) { | |
67 return (-1); | 66 return (-1); |
68 } | 67 } |
69 SDL_initialized |= SDL_INIT_VIDEO; | 68 SDL_initialized |= SDL_INIT_VIDEO; |
70 } | 69 } |
71 #else | 70 #else |
76 #endif | 75 #endif |
77 | 76 |
78 #if !SDL_AUDIO_DISABLED | 77 #if !SDL_AUDIO_DISABLED |
79 /* Initialize the audio subsystem */ | 78 /* Initialize the audio subsystem */ |
80 if ((flags & SDL_INIT_AUDIO) && !(SDL_initialized & SDL_INIT_AUDIO)) { | 79 if ((flags & SDL_INIT_AUDIO) && !(SDL_initialized & SDL_INIT_AUDIO)) { |
81 if (SDL_AudioInit(SDL_getenv("SDL_AUDIODRIVER")) < 0) { | 80 if (SDL_AudioInit(NULL) < 0) { |
82 return (-1); | 81 return (-1); |
83 } | 82 } |
84 SDL_initialized |= SDL_INIT_AUDIO; | 83 SDL_initialized |= SDL_INIT_AUDIO; |
85 } | 84 } |
86 #else | 85 #else |