shithub: choc

Download patch

ref: 9943fcfd70b75bf5182dd3a0b7b7a8b7ce5cd2e0
parent: 251619c8f24672a4b52683c280043af4157e5a2c
author: Turo Lamminen <turol@iki.fi>
date: Tue Jul 12 16:48:51 EDT 2022

Move fluidsynth and timidity configuration code earlier

It's needed even when SDL2_mixer is disabled

--- a/src/i_sdlmusic.c
+++ b/src/i_sdlmusic.c
@@ -44,20 +44,7 @@
 #include "w_wad.h"
 #include "z_zone.h"
 
-#define MAXMIDLENGTH (96 * 1024)
 
-static boolean music_initialized = false;
-
-// If this is true, this module initialized SDL sound and has the 
-// responsibility to shut it down
-
-static boolean sdl_was_initialized = false;
-
-static boolean win_midi_stream_opened = false;
-
-static boolean musicpaused = false;
-static int current_music_volume;
-
 char *fluidsynth_sf_path = "";
 char *timidity_cfg_path = "";
 
@@ -137,6 +124,22 @@
         temp_timidity_cfg = NULL;
     }
 }
+
+
+#define MAXMIDLENGTH (96 * 1024)
+
+static boolean music_initialized = false;
+
+// If this is true, this module initialized SDL sound and has the
+// responsibility to shut it down
+
+static boolean sdl_was_initialized = false;
+
+static boolean win_midi_stream_opened = false;
+
+static boolean musicpaused = false;
+static int current_music_volume;
+
 
 // Remove the temporary config file generated by I_InitTimidityConfig().