From fce53f18e6be96d7d32d5e6584366c39eb3c4dc3 Mon Sep 17 00:00:00 2001
From: "p.kosyh"
Date: Sat, 12 Sep 2009 08:58:09 +0000
Subject: [PATCH] sdl cleanups
---
src/sdl-instead/graphics.c | 2 +-
src/sdl-instead/sound.c | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/sdl-instead/graphics.c b/src/sdl-instead/graphics.c
index 8d74998..802c5c3 100644
--- a/src/sdl-instead/graphics.c
+++ b/src/sdl-instead/graphics.c
@@ -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;
}
diff --git a/src/sdl-instead/sound.c b/src/sdl-instead/sound.c
index ffda372..04034e5 100644
--- a/src/sdl-instead/sound.c
+++ b/src/sdl-instead/sound.c
@@ -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)