1
0
mirror of https://github.com/blupi-games/planetblupi synced 2024-12-30 10:15:36 +01:00

Restore other fade out with non JS platforms

This commit is contained in:
Mathieu Schroeter 2018-07-21 17:40:29 +02:00
parent ee80592a6f
commit a40ef7d3f8

View File

@ -278,7 +278,12 @@ CSound::PlayImage (Sounds channel, Point pos, Sint32 rank)
{
stopCh = m_channelBlupi[rank];
if (stopCh >= 0 && m_lpSDL[stopCh] != nullptr)
Mix_HaltChannel (stopCh + 1);
{
if (Platform::getType () == Platform::Type::SDL)
Mix_FadeOutChannel (stopCh + 1, 500);
else /* FIXME: fade broken with emscripten */
Mix_HaltChannel (stopCh + 1);
}
m_channelBlupi[rank] = channel;
}