mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-25 20:22:30 +01:00
perfoverlay: fix minimal graph min/max calculation
This commit is contained in:
parent
f6759de1e9
commit
e0baad417a
@ -746,14 +746,11 @@ namespace rsx
|
||||
return;
|
||||
}
|
||||
|
||||
m_min = max_v<f32>;
|
||||
m_max = 0.0f;
|
||||
m_avg = 0.0f;
|
||||
m_1p = 0.0f;
|
||||
|
||||
if (m_show_min_max || m_show_1p_avg)
|
||||
{
|
||||
m_min = max_v<f32>;
|
||||
|
||||
std::vector<f32> valid_datapoints;
|
||||
|
||||
// Make sure min/max reflects the data being displayed, not the entire datapoints vector
|
||||
@ -767,8 +764,11 @@ namespace rsx
|
||||
m_max = std::max(m_max, dp);
|
||||
m_avg += dp;
|
||||
|
||||
if (m_show_1p_avg)
|
||||
{
|
||||
valid_datapoints.push_back(dp);
|
||||
}
|
||||
}
|
||||
|
||||
// Sanitize min value
|
||||
m_min = std::min(m_min, m_max);
|
||||
@ -789,11 +789,6 @@ namespace rsx
|
||||
m_1p = std::accumulate(valid_datapoints.begin(), valid_datapoints.begin() + n_1p, 0.0f) / static_cast<float>(n_1p);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_min = 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
void graph::update()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user