ref: 459992fae806f5655fd755edd2d30ed4d87272b7
parent: 0ab82301d054452d319f0a23b7aeaf10270da60a
author: Roman Fomin <rfomin@gmail.com>
date: Fri Jan 14 09:56:26 EST 2022
Fix Fluidsynth pause on Windows
--- a/src/i_sdlmusic.c
+++ b/src/i_sdlmusic.c
@@ -342,12 +342,17 @@
}
#if defined(_WIN32)
- I_WIN_PauseSong();
-#else
- musicpaused = true;
-
- UpdateMusicVolume();
+ if (win_midi_stream_opened)
+ {
+ I_WIN_PauseSong();
+ }
+ else
#endif
+ {
+ musicpaused = true;
+
+ UpdateMusicVolume();
+ }
}
static void I_SDL_ResumeSong(void)
@@ -358,12 +363,17 @@
}
#if defined(_WIN32)
- I_WIN_ResumeSong();
-#else
- musicpaused = false;
-
- UpdateMusicVolume();
+ if (win_midi_stream_opened)
+ {
+ I_WIN_ResumeSong();
+ }
+ else
#endif
+ {
+ musicpaused = false;
+
+ UpdateMusicVolume();
+ }
}
static void I_SDL_StopSong(void)