]> git.lizzy.rs Git - shadowclad.git/blobdiff - src/game/input.c
Preliminary troubleshooting for #28
[shadowclad.git] / src / game / input.c
index bf4ab03ebab671bb0ef44f52d443f84263a946a7..10c290bee71636088a70c2b62eb1025c65f1bce9 100644 (file)
@@ -1,8 +1,26 @@
 #include "input.h"
 
+#include "engine/logger.h"
+
 #include "player.h"
 
 void onKeyboardEvent(GLFWwindow* window, int key, int scancode, int action, int mods) {
+       const char* actionName;
+       switch (action) {
+               case GLFW_PRESS:
+                       actionName = "GLFW_PRESS";
+                       break;
+               case GLFW_REPEAT:
+                       actionName = "GLFW_REPEAT";
+                       break;
+               case GLFW_RELEASE:
+                       actionName = "GLFW_RELEASE";
+                       break;
+               default:
+                       actionName = "(unrecognised action)";
+                       break;
+       }
+       //logDebug("window %p, key %d, action %s", window, key, actionName);
        switch (key) {
                case GLFW_KEY_W:
                        if (action == GLFW_PRESS) {