Skip to content

Commit 1aed079

Browse files
committed
improve GYM length detection
Just be a bit more lenient with broken files. (and make playback and length calculation behave consistently)
1 parent 7a087d6 commit 1aed079

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

player/gymplayer.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ void GYMPlayer::CalcSongLength(void)
212212
filePos += 0x01;
213213
break;
214214
default:
215-
fileEnd = true;
215+
// just ignore unknown commands
216216
break;
217217
}
218218
}
@@ -1014,6 +1014,9 @@ void GYMPlayer::DoCommand(void)
10141014
cDev->write(dataPtr, SN76496_W_REG, data);
10151015
}
10161016
return;
1017+
default:
1018+
emu_logf(&_logger, PLRLOG_WARN, "Unknown GYM command %02X found! (filePos 0x%06X)\n", curCmd, _filePos - 0x01);
1019+
return;
10171020
}
10181021

10191022
return;

0 commit comments

Comments
 (0)