Make FIFO frame count inclusive

The 'zero frames in the range' check can be removed because now there is always at least 1 frame; of course that might be the same frame over and over again, but that's still useful for e.g. Free Look (and the 1 frame repeating effect already occurred when frame count was exclusive).
This commit is contained in:
Pokechu22
2021-02-08 16:25:57 -08:00
parent 263ca79aae
commit 58333d6feb
2 changed files with 12 additions and 15 deletions

View File

@ -301,12 +301,12 @@ void FIFOPlayerWindow::OnFIFOLoaded()
auto object_count = FifoPlayer::GetInstance().GetMaxObjectCount();
auto frame_count = file->GetFrameCount();
m_frame_range_to->setMaximum(frame_count);
m_frame_range_to->setMaximum(frame_count - 1);
m_object_range_to->setMaximum(object_count - 1);
m_frame_range_from->setValue(0);
m_object_range_from->setValue(0);
m_frame_range_to->setValue(frame_count);
m_frame_range_to->setValue(frame_count - 1);
m_object_range_to->setValue(object_count - 1);
UpdateInfo();
@ -334,8 +334,8 @@ void FIFOPlayerWindow::OnLimitsChanged()
void FIFOPlayerWindow::UpdateLimits()
{
m_frame_range_from->setMaximum(std::max(m_frame_range_to->value() - 1, 0));
m_frame_range_to->setMinimum(m_frame_range_from->value() + 1);
m_frame_range_from->setMaximum(m_frame_range_to->value());
m_frame_range_to->setMinimum(m_frame_range_from->value());
m_object_range_from->setMaximum(m_object_range_to->value());
m_object_range_to->setMinimum(m_object_range_from->value());
}