RenderBase: show total framecount on movie playback

Previously, when playing back a movie, you could not see the total frame count of a movie, only the total number of input polls.

This change simply shows the total frame count on movie playback.

Note that this change also results in the framecount and framecount total ALWAYS being displayed if show_movie_window is true, regardless of whether or not m_ShowFrameCount is true. I believe this is fine, as TASers are much more likely to reference the framecount than the input poll count.
This commit is contained in:
sowens99 2021-09-28 22:15:25 -04:00
parent 753a1595bf
commit 53ca2ec274
1 changed files with 6 additions and 4 deletions

View File

@ -559,15 +559,17 @@ void Renderer::DrawDebugText()
ImGui::GetIO().DisplaySize); ImGui::GetIO().DisplaySize);
if (ImGui::Begin("Movie", nullptr, ImGuiWindowFlags_NoFocusOnAppearing)) if (ImGui::Begin("Movie", nullptr, ImGuiWindowFlags_NoFocusOnAppearing))
{ {
if (config.m_ShowFrameCount)
{
ImGui::Text("Frame: %" PRIu64, Movie::GetCurrentFrame());
}
if (Movie::IsPlayingInput()) if (Movie::IsPlayingInput())
{ {
ImGui::Text("Frame: %" PRIu64 " / %" PRIu64, Movie::GetCurrentFrame(),
Movie::GetTotalFrames());
ImGui::Text("Input: %" PRIu64 " / %" PRIu64, Movie::GetCurrentInputCount(), ImGui::Text("Input: %" PRIu64 " / %" PRIu64, Movie::GetCurrentInputCount(),
Movie::GetTotalInputCount()); Movie::GetTotalInputCount());
} }
else if (config.m_ShowFrameCount)
{
ImGui::Text("Frame: %" PRIu64, Movie::GetCurrentFrame());
}
if (SConfig::GetInstance().m_ShowLag) if (SConfig::GetInstance().m_ShowLag)
ImGui::Text("Lag: %" PRIu64 "\n", Movie::GetCurrentLagCount()); ImGui::Text("Lag: %" PRIu64 "\n", Movie::GetCurrentLagCount());
if (SConfig::GetInstance().m_ShowInputDisplay) if (SConfig::GetInstance().m_ShowInputDisplay)