SDL_mixer: Don't halt all channels when halting a halted channel

Mix_Playing(-1) counts the number of playing channels instead of returning
that the channel -1 is not playing, and Mix_HaltChannel(-1) stops
everything.
stable-5.2
Günther Brammer 2009-07-07 14:27:19 +02:00
parent e18e51d36b
commit b085349e86
1 changed files with 1 additions and 1 deletions

View File

@ -309,7 +309,7 @@ BOOL C4SoundInstance::Playing()
: timeGetTime() < iStarted + pEffect->Length;
#endif
#ifdef HAVE_LIBSDL_MIXER
return Application.MusicSystem.MODInitialized && Mix_Playing(iChannel);
return Application.MusicSystem.MODInitialized && (iChannel != -1) && Mix_Playing(iChannel);
#endif
return false;
}