Fix MAKO::check_music()

This fixes infinite loop in the opening demo of Only You, waiting for
the end of the music.
This commit is contained in:
kichikuou
2023-03-17 15:53:52 +09:00
parent 425ddf3ea8
commit be18e06e09
5 changed files with 76 additions and 14 deletions
+9 -1
View File
@@ -70,7 +70,15 @@ void MAKO::stop_music()
bool MAKO::check_music()
{
return current_music != 0;
if (!current_music)
return false;
if (fm) {
int mark, loop;
fm->get_mark(&mark, &loop);
return !loop;
}
return EM_ASM_INT_V( return xsystem35.cdPlayer.getPosition(); ) != 0;
}
void MAKO::get_mark(int* mark, int* loop)