impr: Unlock frame rate when scrolling or focusing
This commit is contained in:
parent
6ecc495d43
commit
fc95e5a9a8
@ -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);
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user