[SoundSystem] Don’t play any sound if while application is minimized
diff --git a/src/docs/Changelog b/src/docs/Changelog
index b5bf02d..bf2b277 100644
--- a/src/docs/Changelog
+++ b/src/docs/Changelog
@@ -2,6 +2,7 @@
* [Filesystem] Changed fs_debug logging option
* [Engine] Fix mouse locking issues when the mouse would lock at the center of your screen
* [Engine] Implemented Com_Clampi and simplified timeNudge
+ * [SoundSystem] Don't play any sound if while application is minimized
2021-04-03 Dusan Jocic <dusanjocic@msn>
* [RendererSystem} Addressed the problem with DPI inside the engine
diff --git a/src/engine/soundSystem/sndSystem_load.cpp b/src/engine/soundSystem/sndSystem_load.cpp
index 810bef8..ce1a049 100644
--- a/src/engine/soundSystem/sndSystem_load.cpp
+++ b/src/engine/soundSystem/sndSystem_load.cpp
@@ -257,6 +257,11 @@ idSoundSystemLocal::StartSound
*/
void idSoundSystemLocal::StartSound( vec3_t origin, sint entnum, sint entchannel, sfxHandle_t sfx )
{
+ if( com_minimized->integer )
+ {
+ return;
+ }
+
if( useBuiltin )
{
SOrig_StartSound( origin, entnum, entchannel, sfx );
GitHub
sha: 62aaaf3d