mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-06 23:11:25 +12:00
perf overlays: add detail level none (hides FPS)
This commit is contained in:
parent
c71bc25090
commit
038c708a0a
5 changed files with 31 additions and 3 deletions
|
@ -183,7 +183,12 @@ namespace rsx
|
||||||
// Position the graphs within the body
|
// Position the graphs within the body
|
||||||
const u16 graphs_width = m_body.w;
|
const u16 graphs_width = m_body.w;
|
||||||
const u16 body_left = m_body.x;
|
const u16 body_left = m_body.x;
|
||||||
u16 y_offset = m_body.y + m_body.h + perf_overlay_padding;
|
u16 y_offset = m_body.y;
|
||||||
|
|
||||||
|
if (m_body.h > 0)
|
||||||
|
{
|
||||||
|
y_offset += m_body.h + perf_overlay_padding;
|
||||||
|
}
|
||||||
|
|
||||||
if (m_framerate_graph_enabled)
|
if (m_framerate_graph_enabled)
|
||||||
{
|
{
|
||||||
|
@ -220,7 +225,8 @@ namespace rsx
|
||||||
|
|
||||||
switch (m_detail)
|
switch (m_detail)
|
||||||
{
|
{
|
||||||
case detail_level::minimal:
|
case detail_level::none: [[fallthrough]];
|
||||||
|
case detail_level::minimal: [[fallthrough]];
|
||||||
case detail_level::low: m_titles.set_text(""); break;
|
case detail_level::low: m_titles.set_text(""); break;
|
||||||
case detail_level::medium: m_titles.set_text(fmt::format("\n\n%s", title1_medium)); break;
|
case detail_level::medium: m_titles.set_text(fmt::format("\n\n%s", title1_medium)); break;
|
||||||
case detail_level::high: m_titles.set_text(fmt::format("\n\n%s\n\n\n\n\n\n%s", title1_high, title2)); break;
|
case detail_level::high: m_titles.set_text(fmt::format("\n\n%s\n\n\n\n\n\n%s", title1_high, title2)); break;
|
||||||
|
@ -459,10 +465,15 @@ namespace rsx
|
||||||
[[fallthrough]];
|
[[fallthrough]];
|
||||||
}
|
}
|
||||||
case detail_level::minimal:
|
case detail_level::minimal:
|
||||||
|
{
|
||||||
|
[[fallthrough]];
|
||||||
|
}
|
||||||
|
case detail_level::none:
|
||||||
{
|
{
|
||||||
m_fps = std::max(0.f, static_cast<f32>(m_frames / (elapsed_update / 1000)));
|
m_fps = std::max(0.f, static_cast<f32>(m_frames / (elapsed_update / 1000)));
|
||||||
if (m_is_initialised && m_framerate_graph_enabled)
|
if (m_is_initialised && m_framerate_graph_enabled)
|
||||||
m_fps_graph.record_datapoint(m_fps);
|
m_fps_graph.record_datapoint(m_fps);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -472,6 +483,10 @@ namespace rsx
|
||||||
|
|
||||||
switch (m_detail)
|
switch (m_detail)
|
||||||
{
|
{
|
||||||
|
case detail_level::none:
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
case detail_level::minimal:
|
case detail_level::minimal:
|
||||||
{
|
{
|
||||||
perf_text += fmt::format("FPS : %05.2f", m_fps);
|
perf_text += fmt::format("FPS : %05.2f", m_fps);
|
||||||
|
@ -512,7 +527,15 @@ namespace rsx
|
||||||
|
|
||||||
m_body.set_text(perf_text);
|
m_body.set_text(perf_text);
|
||||||
|
|
||||||
if (m_body.auto_resize())
|
if (perf_text.empty())
|
||||||
|
{
|
||||||
|
if (m_body.w > 0 || m_body.h > 0)
|
||||||
|
{
|
||||||
|
m_body.set_size(0, 0);
|
||||||
|
reset_transforms();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (m_body.auto_resize())
|
||||||
{
|
{
|
||||||
reset_transforms();
|
reset_transforms();
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,8 @@ namespace rsx
|
||||||
struct perf_metrics_overlay : overlay
|
struct perf_metrics_overlay : overlay
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
// The detail level does not affect frame graphs apart from their width.
|
||||||
|
// none
|
||||||
// minimal - fps
|
// minimal - fps
|
||||||
// low - fps, total cpu usage
|
// low - fps, total cpu usage
|
||||||
// medium - fps, detailed cpu usage
|
// medium - fps, detailed cpu usage
|
||||||
|
|
|
@ -132,6 +132,7 @@ void fmt_class_string<detail_level>::format(std::string& out, u64 arg)
|
||||||
{
|
{
|
||||||
switch (value)
|
switch (value)
|
||||||
{
|
{
|
||||||
|
case detail_level::none: return "None";
|
||||||
case detail_level::minimal: return "Minimal";
|
case detail_level::minimal: return "Minimal";
|
||||||
case detail_level::low: return "Low";
|
case detail_level::low: return "Low";
|
||||||
case detail_level::medium: return "Medium";
|
case detail_level::medium: return "Medium";
|
||||||
|
|
|
@ -147,6 +147,7 @@ enum class msaa_level
|
||||||
|
|
||||||
enum class detail_level
|
enum class detail_level
|
||||||
{
|
{
|
||||||
|
none,
|
||||||
minimal,
|
minimal,
|
||||||
low,
|
low,
|
||||||
medium,
|
medium,
|
||||||
|
|
|
@ -887,6 +887,7 @@ QString emu_settings::GetLocalizedSetting(const QString& original, emu_settings_
|
||||||
case emu_settings_type::PerfOverlayDetailLevel:
|
case emu_settings_type::PerfOverlayDetailLevel:
|
||||||
switch (static_cast<detail_level>(index))
|
switch (static_cast<detail_level>(index))
|
||||||
{
|
{
|
||||||
|
case detail_level::none: return tr("None", "Detail Level");
|
||||||
case detail_level::minimal: return tr("Minimal", "Detail Level");
|
case detail_level::minimal: return tr("Minimal", "Detail Level");
|
||||||
case detail_level::low: return tr("Low", "Detail Level");
|
case detail_level::low: return tr("Low", "Detail Level");
|
||||||
case detail_level::medium: return tr("Medium", "Detail Level");
|
case detail_level::medium: return tr("Medium", "Detail Level");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue