sdl cleanups

This commit is contained in:
p.kosyh 2009-09-12 08:58:09 +00:00
parent c3e9439b09
commit fce53f18e6
2 changed files with 6 additions and 6 deletions

View file

@ -2134,7 +2134,7 @@ void gfx_change_screen(img_t src)
int gfx_init(void)
{
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER) < 0) {
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_AUDIO) < 0) {
fprintf(stderr, "Couldn't initialize SDL: %s\n", SDL_GetError());
return -1;
}

View file

@ -67,10 +67,10 @@ int snd_init(int hz)
if (!audio_buffers) /* wrong parameter? */
audio_buffers = 8192;
if (SDL_InitSubSystem(SDL_INIT_AUDIO) < 0) {
fprintf(stderr, "Unable to init audio!\n");
return -1;
}
// if (SDL_InitSubSystem(SDL_INIT_AUDIO) < 0) {
// fprintf(stderr, "Unable to init audio!\n");
// return -1;
// }
if (alsa_sw) {
SDL_AudioInit("alsa");
@ -208,7 +208,7 @@ void snd_done(void)
free(next_mus);
next_mus = NULL;
Mix_CloseAudio();
SDL_QuitSubSystem(SDL_INIT_AUDIO);
// SDL_QuitSubSystem(SDL_INIT_AUDIO);
}
int snd_vol_from_pcn(int v)