From b72b631e950479478d5a6516c6e9c3ccf1a27864 Mon Sep 17 00:00:00 2001 From: Clownacy Date: Sat, 4 Apr 2020 17:47:45 +0100 Subject: [PATCH] Simplify GLFW code --- src/Backends/GLFW3/Misc.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/Backends/GLFW3/Misc.cpp b/src/Backends/GLFW3/Misc.cpp index f309cab2..df8e0f91 100644 --- a/src/Backends/GLFW3/Misc.cpp +++ b/src/Backends/GLFW3/Misc.cpp @@ -21,17 +21,7 @@ #define DO_KEY(GLFW_KEY, BACKEND_KEY) \ case GLFW_KEY: \ - switch (action) \ - { \ - case GLFW_PRESS: \ - backend_keyboard_state[BACKEND_KEY] = TRUE; \ - break; \ - \ - case GLFW_RELEASE: \ - backend_keyboard_state[BACKEND_KEY] = FALSE; \ - break; \ - } \ - \ + backend_keyboard_state[BACKEND_KEY] = action == GLFW_PRESS; \ break; GLFWwindow *window;