ref: b72b631e950479478d5a6516c6e9c3ccf1a27864
parent: 39ddfd97911fa42c5e3ebacc5490e0a03cdf207d
author: Clownacy <Clownacy@users.noreply.github.com>
date: Sat Apr 4 13:47:45 EDT 2020
Simplify GLFW code
--- 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;