shithub: choc

Download patch

ref: c8d319222d67bfd848b8770fa050883ef590cb10
parent: 0ab82301d054452d319f0a23b7aeaf10270da60a
parent: 459992fae806f5655fd755edd2d30ed4d87272b7
author: Fabian Greffrath <[email protected]>
date: Fri Jan 14 04:07:58 EST 2022

Merge pull request #1431 from rfomin/fix_fl_pause

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)