Fixed the game process staying active in the background after a crash (due to a running sound streaming thread)

This commit is contained in:
Regalis
2017-03-03 20:58:32 +02:00
parent c96fcf7f34
commit 88a76f0c9f

View File

@@ -381,6 +381,10 @@ namespace Barotrauma.Sounds
Instance = this;
underlyingThread = new Thread(EnsureBuffersFilled) { Priority = ThreadPriority.Lowest };
//background threads are automatically stopped when all foreground threads have been stopped
// -> the streaming thread won't stay running in the background if the main thread crashes
underlyingThread.IsBackground = true;
underlyingThread.Start();
}