From 14cddf3d36a2858d6c0548660d5e7e88d6add97f Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Fri, 25 Jun 2021 21:26:33 -0500 Subject: [PATCH] [nostalgia/core/glfw] Cleanup --- src/nostalgia/core/glfw/core.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/nostalgia/core/glfw/core.cpp b/src/nostalgia/core/glfw/core.cpp index 0157e4df..9b6a45bd 100644 --- a/src/nostalgia/core/glfw/core.cpp +++ b/src/nostalgia/core/glfw/core.cpp @@ -32,12 +32,8 @@ static void handleKeyPress(Context *ctx, int key) { static void handleGlfwKeyEvent(GLFWwindow *window, int key, int, int action, int) { const auto ctx = static_cast(glfwGetWindowUserPointer(window)); - switch (action) { - case GLFW_PRESS: - handleKeyPress(ctx, key); - break; - default: - break; + if (action == GLFW_PRESS) { + handleKeyPress(ctx, key); } }