summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--main/imgui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/imgui.cpp b/main/imgui.cpp
index c4c0cd2c..0a90a3a1 100644
--- a/main/imgui.cpp
+++ b/main/imgui.cpp
@@ -156,7 +156,7 @@ void app::draw_fps()
auto c6 = push_style_color(ImGuiCol_Text, {0, 1, 0, 1});
char buf[16];
- const double hz = _frame_time > 1e-6f ? std::round(1/double(_frame_time)*10.)*.1 + 0.02 : 9999;
+ const double hz = _frame_time > 1e-6f ? (int)std::round(10./(double)_frame_time + .05) * .1 : 9999;
snprintf(buf, sizeof(buf), "%.1f FPS", hz);
const ImVec2 size = ImGui::CalcTextSize(buf);