- 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);
}
Timidity::FreeAll();
WildMidi_Shutdown();
#ifdef _WIN32
I_ShutdownMusicWin32();
#endif // _WIN32

View file

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