[SoundSystem] Don’t play sound while minimized
diff --git a/src/docs/Changelog b/src/docs/Changelog
index 6d5c74a..3083e74 100644
--- a/src/docs/Changelog
+++ b/src/docs/Changelog
@@ -1,6 +1,7 @@
2021-04-11 Dusan Jocic <dusanjocic@msn>
* [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
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 7088b54..585beef 100644
--- a/src/engine/soundSystem/sndSystem_dma.cpp
+++ b/src/engine/soundSystem/sndSystem_dma.cpp
@@ -656,6 +656,11 @@ void SOrig_StartSound( vec3_t origin, sint entityNum, sint entchannel, sfxHandle
return;
}
+ if( com_minimized->integer )
+ {
+ return;
+ }
+
if( !origin && ( entityNum < 0 || entityNum > MAX_GENTITIES ) )
{
Com_Error( ERR_DROP, "S_StartSound: bad entitynum %i", entityNum );
GitHub
sha: 41e2a20d