Fixed buffer overflowing because of mouse input

This commit is contained in:
2021-08-30 22:50:16 -07:00
parent e2e1e5fbac
commit 46752c6d22
7 changed files with 102 additions and 39 deletions

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;
}
}