mirror of https://github.com/WerWolv/ImHex.git
fix: Frame rate not unlocking correctly (#890)
m_hadEvent could be set during glfwWaitEventsTimeout and then immediately cleared before ever being checked.
This commit is contained in:
parent
92f0aa9593
commit
ca68150970
|
@ -212,6 +212,7 @@ namespace hex {
|
|||
|
||||
bool frameRateUnlocked = ImGui::IsPopupOpen(ImGuiID(0), ImGuiPopupFlags_AnyPopupId) || TaskManager::getRunningTaskCount() > 0 || this->m_mouseButtonDown || this->m_hadEvent || !this->m_pressedKeys.empty();
|
||||
const double timeout = std::max(0.0, (1.0 / 5.0) - (glfwGetTime() - this->m_lastFrameTime));
|
||||
this->m_hadEvent = false;
|
||||
|
||||
if ((this->m_lastFrameTime - this->m_frameRateUnlockTime) > 5 && this->m_frameRateTemporarilyUnlocked && !frameRateUnlocked) {
|
||||
this->m_frameRateTemporarilyUnlocked = false;
|
||||
|
@ -239,8 +240,6 @@ namespace hex {
|
|||
}
|
||||
|
||||
this->m_lastFrameTime = glfwGetTime();
|
||||
|
||||
this->m_hadEvent = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue