mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Fix MIDI not reloading when erroring on a player
This commit is contained in:
parent
a4d6458ecd
commit
e5b4cf2dcf
1 changed files with 5 additions and 5 deletions
|
|
@ -81,7 +81,7 @@ static void Midiplayer_Onchange(void)
|
||||||
{
|
{
|
||||||
boolean restart = false;
|
boolean restart = false;
|
||||||
|
|
||||||
if (I_SongType() != MU_MID_EX && I_SongType() != MU_MID)
|
if (I_SongType() != MU_NONE && I_SongType() != MU_MID_EX && I_SongType() != MU_MID)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (Mix_GetMidiPlayer() != cv_midiplayer.value)
|
if (Mix_GetMidiPlayer() != cv_midiplayer.value)
|
||||||
|
|
@ -104,7 +104,7 @@ static void Midiplayer_Onchange(void)
|
||||||
|
|
||||||
static void MidiSoundfontPath_Onchange(void)
|
static void MidiSoundfontPath_Onchange(void)
|
||||||
{
|
{
|
||||||
if (I_SongType() != MU_MID_EX && Mix_GetMidiPlayer() != MIDI_Fluidsynth)
|
if (I_SongType() != MU_NONE && I_SongType() != MU_MID_EX && Mix_GetMidiPlayer() != MIDI_Fluidsynth)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (stricmp(Mix_GetSoundFonts(), cv_midisoundfontpath.string))
|
if (stricmp(Mix_GetSoundFonts(), cv_midisoundfontpath.string))
|
||||||
|
|
@ -148,14 +148,14 @@ void I_StartupSound(void)
|
||||||
music = NULL;
|
music = NULL;
|
||||||
music_volume = sfx_volume = 0;
|
music_volume = sfx_volume = 0;
|
||||||
|
|
||||||
#if SDL_MIXER_VERSION_ATLEAST(1,2,11)
|
|
||||||
Mix_Init(MIX_INIT_FLAC|MIX_INIT_MOD|MIX_INIT_MP3|MIX_INIT_OGG);
|
|
||||||
#endif
|
|
||||||
#if HAVE_MIXERX
|
#if HAVE_MIXERX
|
||||||
Mix_SetMidiPlayer(cv_midiplayer.value);
|
Mix_SetMidiPlayer(cv_midiplayer.value);
|
||||||
Mix_SetSoundFonts(cv_midisoundfontpath.string);
|
Mix_SetSoundFonts(cv_midisoundfontpath.string);
|
||||||
Mix_Timidity_addToPathList(cv_miditimiditypath.string);
|
Mix_Timidity_addToPathList(cv_miditimiditypath.string);
|
||||||
#endif
|
#endif
|
||||||
|
#if SDL_MIXER_VERSION_ATLEAST(1,2,11)
|
||||||
|
Mix_Init(MIX_INIT_FLAC|MIX_INIT_MOD|MIX_INIT_MP3|MIX_INIT_OGG);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (Mix_OpenAudio(44100, AUDIO_S16SYS, 2, 2048) < 0)
|
if (Mix_OpenAudio(44100, AUDIO_S16SYS, 2, 2048) < 0)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue