Skip to content

Commit

Permalink
OSD: Clarify Min/Avg/Max label to Frametime counter
Browse files Browse the repository at this point in the history
  • Loading branch information
kamfretoz authored and lightningterror committed Oct 14, 2024
1 parent dafca1e commit 1b82fac
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pcsx2/ImGui/ImGuiOverlays.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,10 @@ __ri void ImGuiManager::DrawPerformanceOverlay(float& position_y, float scale, f
DRAW_LINE(fixed_font, text.c_str(), IM_COL32(255, 255, 255, 255));

text.clear();
text.append_format("{} QF | {:.2f}ms | {:.2f}ms | {:.2f}ms",
text.append_format("{} QF | Min: {:.2f}ms | Avg: {:.2f}ms | Max: {:.2f}ms",
MTGS::GetCurrentVsyncQueueSize() - 1, // we subtract one for the current frame
PerformanceMetrics::GetMinimumFrameTime(), PerformanceMetrics::GetAverageFrameTime(),
PerformanceMetrics::GetMinimumFrameTime(),
PerformanceMetrics::GetAverageFrameTime(),
PerformanceMetrics::GetMaximumFrameTime());
DRAW_LINE(fixed_font, text.c_str(), IM_COL32(255, 255, 255, 255));
}
Expand Down Expand Up @@ -331,7 +332,7 @@ __ri void ImGuiManager::DrawPerformanceOverlay(float& position_y, float scale, f
const ImVec2 wpos(ImGui::GetCurrentWindow()->Pos);

text.clear();
text.append_format("{:.1f} ms", max);
text.append_format("Max: {:.1f} ms", max);
text_size = fixed_font->CalcTextSizeA(fixed_font->FontSize, FLT_MAX, 0.0f, text.c_str(), text.c_str() + text.length());
win_dl->AddText(ImVec2((GSConfig.OsdPerformancePos == OsdOverlayPos::TopLeft ? 2.0f * spacing : wpos.x + history_size.x - text_size.x - spacing) + shadow_offset,
wpos.y + shadow_offset),
Expand All @@ -340,7 +341,7 @@ __ri void ImGuiManager::DrawPerformanceOverlay(float& position_y, float scale, f
IM_COL32(255, 255, 255, 255), text.c_str(), text.c_str() + text.length());

text.clear();
text.append_format("{:.1f} ms", min);
text.append_format("Min: {:.1f} ms", min);
text_size = fixed_font->CalcTextSizeA(fixed_font->FontSize, FLT_MAX, 0.0f, text.c_str(), text.c_str() + text.length());
win_dl->AddText(ImVec2((GSConfig.OsdPerformancePos == OsdOverlayPos::TopLeft ? 2.0f * spacing : wpos.x + history_size.x - text_size.x - spacing) + shadow_offset,
wpos.y + history_size.y - fixed_font->FontSize + shadow_offset),
Expand Down

0 comments on commit 1b82fac

Please sign in to comment.