Skip to content

Commit

Permalink
Call Sound_End() during the normal exit procedure to ensure that the …
Browse files Browse the repository at this point in the history
…sound system is properly shut down before quitting the game.
  • Loading branch information
isojalka committed Feb 23, 2023
1 parent cd4e61d commit fc4facc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions redalert/startup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,8 @@ int main(int argc, char* argv[])
Reset_Video_Mode();
#endif

Sound_End();

/*
** Flag that this is a clean shutdown (not killed with Ctrl-Alt-Del)
*/
Expand Down
6 changes: 5 additions & 1 deletion tiberiandawn/startup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,11 @@ int main(int argc, char** argv)

#if defined(SDL_BUILD)
Reset_Video_Mode();
#elif defined(_WIN32)
#endif

Sound_End();

#if defined(_WIN32)
PostMessageA(MainWindow, WM_DESTROY, 0, 0);
do {
Keyboard->Check();
Expand Down

0 comments on commit fc4facc

Please sign in to comment.