From 1975a9b8855bef88d5fb7a2fd8597ccca41e0ff6 Mon Sep 17 00:00:00 2001 From: fickleheart Date: Mon, 11 Mar 2019 21:48:29 -0500 Subject: [PATCH] Prevent music changes from playing when unfocused --- src/s_sound.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/s_sound.c b/src/s_sound.c index e8478844..2ddffa3f 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -1906,6 +1906,10 @@ static boolean S_PlayMusic(boolean looping) } S_InitMusicVolume(); // switch between digi and sequence volume + + if (window_notinfocus && !cv_playmusicifunfocused.value) + I_PauseSong(); + return true; }