Fix same object count being used for all frames in the FIFO analyzer

If the number of objects varied, this would result in either missing objects on some frames, or too many objects on some frames; the latter case could cause crashes.  Since it used the current frame to get the count, if the FIFO is started before the FIFO analyzer is opened, then the current frame is effectively random, making it hard to reproduce consistently.

This issue has existed since the FIFO analyzer was implemented for Qt.
This commit is contained in:
Pokechu22
2021-03-31 22:43:21 -07:00
parent ef75381a84
commit 28b71c65af
4 changed files with 19 additions and 14 deletions

View File

@ -262,7 +262,7 @@ void FIFOPlayerWindow::UpdateInfo()
m_info_label->setText(
tr("%1 frame(s)\n%2 object(s)\nCurrent Frame: %3")
.arg(QString::number(file->GetFrameCount()),
QString::number(FifoPlayer::GetInstance().GetFrameObjectCount()),
QString::number(FifoPlayer::GetInstance().GetCurrentFrameObjectCount()),
QString::number(FifoPlayer::GetInstance().GetCurrentFrameNum())));
return;
}