- [FIX] Al acabar un fadeoutmusic podria petar

This commit is contained in:
2025-03-27 13:08:49 +01:00
parent 861c227c54
commit 1d6d92a0b2

View File

@@ -97,6 +97,7 @@ Uint32 JA_UpdateCallback(void *userdata, SDL_TimerID timerID, Uint32 interval)
if (time > (fade_start_time+fade_duration)) {
fading = false;
JA_StopMusic();
return;
} else {
const int time_passed = time - fade_start_time;
const float percent = (float)time_passed / (float)fade_duration;