| 202 | } |
| 203 | |
| 204 | void key_callback(GLFWwindow *window, int key, int /*scancode*/, int action, int /*mods*/) |
| 205 | { |
| 206 | KeyCode key_code = translate_key_code(key); |
| 207 | KeyAction key_action = translate_key_action(action); |
| 208 | |
| 209 | if (auto platform = reinterpret_cast<Platform *>(glfwGetWindowUserPointer(window))) |
| 210 | { |
| 211 | platform->input_event(KeyInputEvent{key_code, key_action}); |
| 212 | } |
| 213 | } |
| 214 | |
| 215 | inline MouseButton translate_mouse_button(int button) |
| 216 | { |
nothing calls this directly
no test coverage detected