1
0
mirror of synced 2025-01-10 21:41:53 +01:00

impr: Unlock frame rate when scrolling or focusing

This commit is contained in:
WerWolv 2025-01-04 22:00:26 +01:00
parent 6ecc495d43
commit fc95e5a9a8

View File

@ -838,6 +838,16 @@ namespace hex {
win->m_unlockFrameRate = true;
});
glfwSetScrollCallback(m_window, [](GLFWwindow *window, double, double) {
auto win = static_cast<Window *>(glfwGetWindowUserPointer(window));
win->m_unlockFrameRate = true;
});
glfwSetWindowFocusCallback(m_window, [](GLFWwindow *window, int) {
auto win = static_cast<Window *>(glfwGetWindowUserPointer(window));
win->m_unlockFrameRate = true;
});
glfwSetWindowFocusCallback(m_window, [](GLFWwindow *, int focused) {
EventWindowFocused::post(focused == GLFW_TRUE);
});