OSD: Clarify Min/Avg/Max label to Frametime counter

This commit is contained in:
KamFretoZ 2024-10-14 16:33:48 +07:00 committed by lightningterror
parent dafca1e264
commit 1b82fac70e
1 changed files with 5 additions and 4 deletions

View File

@ -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));
}
@ -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),
@ -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),