[SoundSystem] Don't play sound even if application is unfocused

[SoundSystem] Don’t play sound even if application is unfocused

diff --git a/src/docs/Changelog b/src/docs/Changelog
index 3083e74..171acb5 100644
--- a/src/docs/Changelog
+++ b/src/docs/Changelog
@@ -2,6 +2,7 @@
 	* [Console] Fixed problems with console tab and input
 	* [Console] Specify console tab to dump in the log file
 	* [SoundSystem] Don't play sound while minimized
+	* [SoundSystem] Don't play sound even if application is unfocused
 
 2021-04-10 Dusan Jocic <dusanjocic@msn>
 	* [Libraries] Cleaning
diff --git a/src/engine/soundSystem/sndSystem_dma.cpp b/src/engine/soundSystem/sndSystem_dma.cpp
index 585beef..81db237 100644
--- a/src/engine/soundSystem/sndSystem_dma.cpp
+++ b/src/engine/soundSystem/sndSystem_dma.cpp
@@ -656,7 +656,7 @@ void SOrig_StartSound( vec3_t origin, sint entityNum, sint entchannel, sfxHandle
         return;
     }
     
-    if( com_minimized->integer )
+    if( com_minimized->integer || com_unfocused->integer )
     {
         return;
     }

GitHub
sha: d34d5d90