MIDI/Windows: Return early from MPU_Init if MPU_Reset was not previously called to shut the MPU down.

git-svn-id: https://svn.eduke32.com/eduke32@6782 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2018-03-22 04:48:54 +00:00
parent bb84fa725e
commit eee1fd6e2c
1 changed files with 4 additions and 0 deletions

View File

@ -257,6 +257,7 @@ int32_t MPU_Reset
{
midiStreamStop(hmido);
midiStreamClose(hmido);
hmido = (HMIDISTRM)-1;
return MPU_Ok;
}
@ -274,6 +275,9 @@ int32_t MPU_Init
)
{
if (hmido != (HMIDISTRM)-1)
return MPU_Ok;
int32_t i;
for (i=0; i<NUMBUFFERS; i++) eventcnt[i]=0;