From fe364d5e8b162148d983943e0079cefd0d328386 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Fri, 29 May 2020 22:24:50 +1000 Subject: [PATCH] SDL: Include frame times in status bar --- src/duckstation-sdl/sdl_host_interface.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/duckstation-sdl/sdl_host_interface.cpp b/src/duckstation-sdl/sdl_host_interface.cpp index d2720e121..63277751e 100644 --- a/src/duckstation-sdl/sdl_host_interface.cpp +++ b/src/duckstation-sdl/sdl_host_interface.cpp @@ -690,6 +690,12 @@ void SDLHostInterface::DrawMainMenuBar() if (!m_paused) { + ImGui::SetCursorPosX(ImGui::GetIO().DisplaySize.x - (420.0f * framebuffer_scale)); + ImGui::Text("Average: %.2fms", m_system->GetAverageFrameTime()); + + ImGui::SetCursorPosX(ImGui::GetIO().DisplaySize.x - (310.0f * framebuffer_scale)); + ImGui::Text("Worst: %.2fms", m_system->GetWorstFrameTime()); + ImGui::SetCursorPosX(ImGui::GetIO().DisplaySize.x - (210.0f * framebuffer_scale)); const float speed = m_system->GetEmulationSpeed();