Add Rerecord Count display
Simply shows Movie::s_rerecords in the ImGui Movie window
This commit is contained in:
parent
57d251c2f0
commit
e4fed7cce8
|
@ -256,6 +256,7 @@ void SConfig::SaveMovieSettings(IniFile& ini)
|
||||||
movie->Set("DumpFramesSilent", m_DumpFramesSilent);
|
movie->Set("DumpFramesSilent", m_DumpFramesSilent);
|
||||||
movie->Set("ShowInputDisplay", m_ShowInputDisplay);
|
movie->Set("ShowInputDisplay", m_ShowInputDisplay);
|
||||||
movie->Set("ShowRTC", m_ShowRTC);
|
movie->Set("ShowRTC", m_ShowRTC);
|
||||||
|
movie->Set("ShowRerecord", m_ShowRerecord);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SConfig::SaveInputSettings(IniFile& ini)
|
void SConfig::SaveInputSettings(IniFile& ini)
|
||||||
|
@ -503,6 +504,7 @@ void SConfig::LoadMovieSettings(IniFile& ini)
|
||||||
movie->Get("DumpFramesSilent", &m_DumpFramesSilent, false);
|
movie->Get("DumpFramesSilent", &m_DumpFramesSilent, false);
|
||||||
movie->Get("ShowInputDisplay", &m_ShowInputDisplay, false);
|
movie->Get("ShowInputDisplay", &m_ShowInputDisplay, false);
|
||||||
movie->Get("ShowRTC", &m_ShowRTC, false);
|
movie->Get("ShowRTC", &m_ShowRTC, false);
|
||||||
|
movie->Get("ShowRerecord", &m_ShowRerecord, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SConfig::LoadInputSettings(IniFile& ini)
|
void SConfig::LoadInputSettings(IniFile& ini)
|
||||||
|
|
|
@ -268,6 +268,7 @@ struct SConfig
|
||||||
|
|
||||||
std::string m_WirelessMac;
|
std::string m_WirelessMac;
|
||||||
bool m_PauseMovie;
|
bool m_PauseMovie;
|
||||||
|
bool m_ShowRerecord;
|
||||||
bool m_ShowLag;
|
bool m_ShowLag;
|
||||||
bool m_ShowFrameCount;
|
bool m_ShowFrameCount;
|
||||||
bool m_ShowRTC;
|
bool m_ShowRTC;
|
||||||
|
|
|
@ -202,6 +202,15 @@ std::string GetRTCDisplay()
|
||||||
return format_time.str();
|
return format_time.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NOTE: GPU Thread
|
||||||
|
std::string GetRerecords()
|
||||||
|
{
|
||||||
|
if (IsMovieActive())
|
||||||
|
return fmt::format("Rerecords: {}", s_rerecords);
|
||||||
|
|
||||||
|
return "Rerecords: N/A";
|
||||||
|
}
|
||||||
|
|
||||||
void FrameUpdate()
|
void FrameUpdate()
|
||||||
{
|
{
|
||||||
s_currentFrame++;
|
s_currentFrame++;
|
||||||
|
|
|
@ -200,6 +200,7 @@ void CheckWiimoteStatus(int wiimote, const WiimoteCommon::DataReportBuilder& rpt
|
||||||
|
|
||||||
std::string GetInputDisplay();
|
std::string GetInputDisplay();
|
||||||
std::string GetRTCDisplay();
|
std::string GetRTCDisplay();
|
||||||
|
std::string GetRerecords();
|
||||||
|
|
||||||
// Done this way to avoid mixing of core and gui code
|
// Done this way to avoid mixing of core and gui code
|
||||||
using GCManipFunction = std::function<void(GCPadStatus*, int)>;
|
using GCManipFunction = std::function<void(GCPadStatus*, int)>;
|
||||||
|
|
|
@ -756,6 +756,12 @@ void MenuBar::AddMovieMenu()
|
||||||
connect(pause_at_end, &QAction::toggled,
|
connect(pause_at_end, &QAction::toggled,
|
||||||
[](bool value) { SConfig::GetInstance().m_PauseMovie = value; });
|
[](bool value) { SConfig::GetInstance().m_PauseMovie = value; });
|
||||||
|
|
||||||
|
auto* rerecord_counter = movie_menu->addAction(tr("Show Rerecord Counter"));
|
||||||
|
rerecord_counter->setCheckable(true);
|
||||||
|
rerecord_counter->setChecked(SConfig::GetInstance().m_ShowRerecord);
|
||||||
|
connect(rerecord_counter, &QAction::toggled,
|
||||||
|
[](bool value) { SConfig::GetInstance().m_ShowRerecord = value; });
|
||||||
|
|
||||||
auto* lag_counter = movie_menu->addAction(tr("Show Lag Counter"));
|
auto* lag_counter = movie_menu->addAction(tr("Show Lag Counter"));
|
||||||
lag_counter->setCheckable(true);
|
lag_counter->setCheckable(true);
|
||||||
lag_counter->setChecked(SConfig::GetInstance().m_ShowLag);
|
lag_counter->setChecked(SConfig::GetInstance().m_ShowLag);
|
||||||
|
|
|
@ -575,8 +575,9 @@ void Renderer::DrawDebugText()
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
}
|
}
|
||||||
|
|
||||||
const bool show_movie_window =
|
const bool show_movie_window = config.m_ShowFrameCount | config.m_ShowLag |
|
||||||
config.m_ShowFrameCount | config.m_ShowLag | config.m_ShowInputDisplay | config.m_ShowRTC;
|
config.m_ShowInputDisplay | config.m_ShowRTC |
|
||||||
|
config.m_ShowRerecord;
|
||||||
if (show_movie_window)
|
if (show_movie_window)
|
||||||
{
|
{
|
||||||
// Position under the FPS display.
|
// Position under the FPS display.
|
||||||
|
@ -606,6 +607,8 @@ void Renderer::DrawDebugText()
|
||||||
ImGui::TextUnformatted(Movie::GetInputDisplay().c_str());
|
ImGui::TextUnformatted(Movie::GetInputDisplay().c_str());
|
||||||
if (SConfig::GetInstance().m_ShowRTC)
|
if (SConfig::GetInstance().m_ShowRTC)
|
||||||
ImGui::TextUnformatted(Movie::GetRTCDisplay().c_str());
|
ImGui::TextUnformatted(Movie::GetRTCDisplay().c_str());
|
||||||
|
if (SConfig::GetInstance().m_ShowRerecord)
|
||||||
|
ImGui::TextUnformatted(Movie::GetRerecords().c_str());
|
||||||
}
|
}
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue