diff --git a/arch/win32/hmpfile.c b/arch/win32/hmpfile.c index 188373b80..edeabba53 100755 --- a/arch/win32/hmpfile.c +++ b/arch/win32/hmpfile.c @@ -297,7 +297,7 @@ static void reset_tracks(struct hmp_file *hmp) hmp->cur_time=0; } -extern int non_loop; +extern int loop; static void _stdcall midi_callback(HMIDISTRM hms, UINT uMsg, DWORD dwUser, DWORD dw1, DWORD dw2) { MIDIHDR *mhdr; @@ -316,12 +316,11 @@ static void _stdcall midi_callback(HMIDISTRM hms, UINT uMsg, DWORD dwUser, DWORD if (!hmp->stop) { while (fill_buffer(hmp) == HMP_EOF) { - if (non_loop) - { - hmp->stop = 1; // ZICO - FIXME - } else { + if (loop) hmp->stop = 0; - } + else + hmp->stop = 1; + reset_tracks(hmp); } if ((rc = midiStreamOut(hmp->hmidi, hmp->evbuf, diff --git a/main/songs.c b/main/songs.c index 76e8dba5b..4c097b45d 100755 --- a/main/songs.c +++ b/main/songs.c @@ -107,17 +107,13 @@ void songs_init() #endif } -int non_loop; +int loop; void songs_play_song( int songnum, int repeat ) { if ( !Songs_initialized ) songs_init(); - if (!repeat) { - non_loop = 1; - } else { - non_loop = 0; - } + loop=repeat; digi_play_midi_song( Songs[songnum].filename, Songs[songnum].melodic_bank_file, Songs[songnum].drum_bank_file, repeat ); }