[nostalgia/core/glfw] Put wait for event in main loop to prevent processor waste

This commit is contained in:
2022-02-10 21:31:00 -06:00
parent f9d3521fe7
commit 8847b2b2ed
2 changed files with 13 additions and 7 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ static void handleKeyPress(Context *ctx, int key) noexcept {
}
static void handleGlfwKeyEvent(GLFWwindow *window, int key, int, int action, int) noexcept {
const auto ctx = static_cast<Context *>(glfwGetWindowUserPointer(window));
const auto ctx = static_cast<Context*>(glfwGetWindowUserPointer(window));
if (action == GLFW_PRESS) {
handleKeyPress(ctx, key);
}