- shut down WildMidi when exiting.

The pointless error message in WildMidi_Shutdown was removed to keep the rest of the code simple and allowing to call this even when the device never was used.
This commit is contained in:
Christoph Oelckers 2015-12-28 21:23:21 +01:00
parent a94120b6a4
commit 060a6b2ff2
2 changed files with 3 additions and 2 deletions

View File

@ -189,6 +189,7 @@ void I_ShutdownMusic(void)
assert (currSong == NULL); assert (currSong == NULL);
} }
Timidity::FreeAll(); Timidity::FreeAll();
WildMidi_Shutdown();
#ifdef _WIN32 #ifdef _WIN32
I_ShutdownMusicWin32(); I_ShutdownMusicWin32();
#endif // _WIN32 #endif // _WIN32

View File

@ -4261,8 +4261,8 @@ WildMidi_GetInfo(midi * handle) {
WM_SYMBOL int WildMidi_Shutdown(void) { WM_SYMBOL int WildMidi_Shutdown(void) {
if (!WM_Initialized) { if (!WM_Initialized) {
_WM_ERROR(__FUNCTION__, __LINE__, WM_ERR_NOT_INIT, NULL, 0); // No error if trying to shut down an uninitialized device.
return -1; return 0;
} }
while (first_handle) { while (first_handle) {
/* closes open handle and rotates the handles list. */ /* closes open handle and rotates the handles list. */