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