Make sure hmp_reset() is only executed if a song was playing

This commit is contained in:
zicodxx 2011-07-08 01:46:27 +02:00
parent dbdf7e27dc
commit 72073d7ed6
2 changed files with 6 additions and 6 deletions

View file

@ -3,6 +3,7 @@ D1X-Rebirth Changelog
20110708
--------
main/net_udp.c: Slight improvement for Packet Loss Prevention: Be able to send to 35 packets per call of net_udp_noloss_process_queue() and also let counter only increase if a packet was actually sent, making sure the queue is not stuck on the first 5 packets in the list
arch/sdl/digi.c: Make sure hmp_reset() is only executed if a song was playing
20110704
--------

View file

@ -186,12 +186,11 @@ void digi_win32_resume_midi_song()
void digi_win32_stop_current_song()
{
if (digi_win32_midi_song_playing)
{
hmp_close(cur_hmp);
cur_hmp = NULL;
digi_win32_midi_song_playing = 0;
}
if (!digi_win32_midi_song_playing)
return;
hmp_close(cur_hmp);
cur_hmp = NULL;
digi_win32_midi_song_playing = 0;
hmp_reset();
}
#endif