[nostalgia/core/glfw] Put wait for event in main loop to prevent processor waste
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user