Skip to content

Commit

Permalink
- stop the music when processing a fatal error.
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed May 19, 2017
1 parent c1e64fa commit 9fc309d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/posix/cocoa/i_main.mm
Expand Up @@ -32,6 +32,7 @@
*/

#include "i_common.h"
#include "s_sound.h"

#include <sys/sysctl.h>
#include <unistd.h>
Expand Down Expand Up @@ -125,6 +126,7 @@ void popterm()
void Mac_I_FatalError(const char* const message)
{
I_SetMainWindowVisible(false);
S_StopMusic(true);

FConsoleWindow::GetInstance().ShowFatalError(message);
}
Expand Down
2 changes: 2 additions & 0 deletions src/win32/i_main.cpp
Expand Up @@ -81,6 +81,7 @@
#include "doomstat.h"
#include "r_utility.h"
#include "g_levellocals.h"
#include "s_sound.h"

#include "stats.h"
#include "st_start.h"
Expand Down Expand Up @@ -1060,6 +1061,7 @@ void DoMain (HINSTANCE hInstance)
{
I_ShutdownGraphics ();
RestoreConView ();
S_StopMusic(true);
I_FlushBufferedConsoleStuff();
if (error.GetMessage ())
{
Expand Down

0 comments on commit 9fc309d

Please sign in to comment.