foxygit / doom Log in
commit c3a7be8768553ba21c7601a4c94898a1e777fce1
Author:     Fabian Greffrath <fabian@greffrath.com>
AuthorDate: Thu Mar 14 16:43:38 2019 +0100
Commit:     Fabian Greffrath <fabian@greffrath.com>
CommitDate: Thu Mar 14 16:43:38 2019 +0100

    sound: more elegant solution to undefined MIX_INIT_MID

    Instead of re-defining MIX_INIT_MID and calling Mix_Init() with empty
    flags, don't call it at all -- the result is the same.
---
 src/i_sdlmusic.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/i_sdlmusic.c b/src/i_sdlmusic.c
index 575856a7..2e7408d1 100644
--- a/src/i_sdlmusic.c
+++ b/src/i_sdlmusic.c
@@ -194,11 +194,10 @@ static boolean I_SDL_InitMusic(void)
         }
     }

+#ifdef MIX_INIT_MID
     // Initialize SDL_Mixer for MIDI music playback
-#ifndef MIX_INIT_MID
-#define MIX_INIT_MID 0
-#endif
     Mix_Init(MIX_INIT_MID);
+#endif

     // Once initialization is complete, the temporary Timidity config
     // file can be removed.