Loop point modulo by length

This commit is contained in:
mazmazz 2018-08-18 20:28:52 -04:00
parent c18372dd06
commit 78b041800e

View file

@ -947,6 +947,11 @@ boolean I_SetMusicLoopPoint(UINT32 looppoint)
return false;
else
{
UINT32 length = I_GetMusicLength();
if (length > 0)
looppoint %= length;
loop_point = max((float)(looppoint / 1000.0L), 0);
return true;
}