Skip to content

Commit

Permalink
- stop all sound before showing ENDOOM.
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed Nov 16, 2022
1 parent d0c8695 commit eb97346
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/common/startscreen/endoom.cpp
Expand Up @@ -192,6 +192,7 @@ int RunEndoom()
return 0;
}

[[noreturn]]
void ST_Endoom()
{
int code = RunEndoom();
Expand Down
3 changes: 2 additions & 1 deletion src/common/startscreen/startscreen.h
Expand Up @@ -102,4 +102,5 @@ class FStartScreen

FStartScreen* GetGameStartScreen(int max_progress);

extern void ST_Endoom();
[[noreturn]]
void ST_Endoom();
15 changes: 11 additions & 4 deletions src/menu/doommenu.cpp
Expand Up @@ -66,6 +66,7 @@
#include "teaminfo.h"
#include "i_time.h"
#include "shiftstate.h"
#include "s_music.h"
#include "hwrenderer/scene/hw_drawinfo.h"

EXTERN_CVAR(Int, cl_gfxlocalization)
Expand Down Expand Up @@ -294,6 +295,14 @@ void System_M_Dim()
}


static void M_Quit()
{
S_StopAllChannels();
S_StopMusic(true);
CleanSWDrawer();
ST_Endoom();
}

//=============================================================================
//
//
Expand All @@ -304,8 +313,7 @@ CCMD (menu_quit)
{ // F10
if (m_quickexit)
{
CleanSWDrawer();
ST_Endoom();
M_Quit();
}

M_StartControlPanel (true);
Expand Down Expand Up @@ -336,8 +344,7 @@ CCMD (menu_quit)
I_WaitVBL(105);
}
}
CleanSWDrawer();
ST_Endoom();
M_Quit();
});


Expand Down

0 comments on commit eb97346

Please sign in to comment.