shithub: choc

Download patch

ref: 10ebb15f419fa9e71db2abb21640b83d8aaaba29
parent: c2c3e55b68c15e4952cb38cc46616e14695622e7
author: Fabian Greffrath <[email protected]>
date: Sat Mar 16 04:57:12 EDT 2019

sound: check if the SDL2_Mixer version checking macro is defined

Turns out that the macro we use to check the SDL2_Mixer version is
defined in the exact version that we check for -- using this macro.

What a mess! This fixes the Travic CI build.

--- a/src/i_sdlmusic.c
+++ b/src/i_sdlmusic.c
@@ -194,7 +194,8 @@
         }
     }
 
-#if SDL_MIXER_VERSION_ATLEAST(2,0,2)
+#if defined(SDL_MIXER_VERSION_ATLEAST) && \
+    SDL_MIXER_VERSION_ATLEAST(2,0,2)
     // Initialize SDL_Mixer for MIDI music playback
     Mix_Init(MIX_INIT_MID);
 #endif