Fixed buffer overflowing because of mouse input

This commit is contained in:
YourWishes committed 2021-08-30 22:50:16 -07:00
1 parent e2e1e5fbac
commit 46752c6d22
7 files changed
+102 -39

No files matched your search

+2 -2
View File
@@ -120,9 +120,9 @@ void glfwOnKey(GLFWwindow *window,
) {
input_t *input = &GAME_STATE->engine.input;
if(action == GLFW_PRESS) {
input->buffer[key] = 1;
input->buffer[(inputsource_t)key] = 1;
} else if(action == GLFW_RELEASE) {
input->buffer[key] = 0;
input->buffer[(inputsource_t)key] = 0;
}
}