]> git.lizzy.rs Git - shadowclad.git/blob - src/engine/input.c
01d3c41173d893059257933fb0de2e57b932144e
[shadowclad.git] / src / engine / input.c
1 #include "input.h"
2
3 #include <stdbool.h>
4
5 static void (*keyboardInputCallback) (int, int, int, int);
6
7
8
9 void onKeyboardEvent(GLFWwindow* window, int key, int scancode, int action, int mods) {
10         bool handled = false;
11
12         if (!handled && keyboardInputCallback) {
13                 keyboardInputCallback(key, scancode, action, mods);
14         }
15 }
16
17 void setKeyboardInputCallback(void (*callback) (int, int, int, int)) {
18         keyboardInputCallback = callback;
19 }