fix: ImHex using way too much resources still

Now frames are rendered at only 5 FPS if no input events are being processed. Thanks a lot to @Tey. Properly fixes #189 now
This commit is contained in:
WerWolv
2021-07-27 21:50:49 +02:00
parent d4e484e982
commit af1d687758
2 changed files with 4 additions and 4 deletions

View File

@@ -7,7 +7,7 @@ namespace hex::plugin::builtin {
ContentRegistry::Interface::addFooterItem([] {
static float framerate = 0;
if (ImGui::HasSecondPassed()) {
framerate = ImGui::GetIO().Framerate;
framerate = 1.0F / ImGui::GetIO().DeltaTime;
}
ImGui::TextUnformatted(hex::format("FPS {0:.2f}", framerate).c_str());