1
0
mirror of synced 2024-11-14 19:17:42 +01:00

fix: ImHex using a ton of CPU power on Linux

This commit is contained in:
WerWolv 2024-03-12 09:06:58 +01:00
parent 0ce1a87cbf
commit 2e09a4e567

View File

@ -213,6 +213,7 @@ namespace hex {
constexpr static auto LongSleepFPS = 5.0;
const double timeout = std::max(0.0, (1.0 / LongSleepFPS) - (glfwGetTime() - m_lastStartFrameTime));
glfwPollEvents();
glfwWaitEventsTimeout(timeout);
} else {
glfwPollEvents();
@ -649,8 +650,6 @@ namespace hex {
m_unlockFrameRate = true;
}
glfwPollEvents();
// Process layout load requests
// NOTE: This needs to be done before a new frame is started, otherwise ImGui won't handle docking correctly
LayoutManager::process();