diff --git a/source/glerminal.cpp b/source/glerminal.cpp index b7c4c36..4e9e5f9 100644 --- a/source/glerminal.cpp +++ b/source/glerminal.cpp @@ -800,7 +800,7 @@ namespace glerminal { glerminal* const self = static_cast(glfwGetWindowUserPointer(window)); - if (self->m_mousemoved) { self->m_mousemoved(x / CELL_SIZE, y / CELL_SIZE); } + if (self->m_mousemoved) { self->m_mousemoved(x / (CELL_SIZE * CELL_SCALE), y / (CELL_SIZE * CELL_SCALE)); } } void glerminal::glfw_mousepress_handler(GLFWwindow *window, int button, int action, int mods) @@ -812,12 +812,12 @@ namespace glerminal if (self->m_mousepressed && action == GLFW_PRESS) { - self->m_mousepressed(button, x / CELL_SIZE, y / CELL_SIZE); + self->m_mousepressed(button, x / (CELL_SIZE * CELL_SCALE), y / (CELL_SIZE * CELL_SCALE)); } if (self->m_mousereleased && action == GLFW_RELEASE) { - self->m_mousereleased(button, x / CELL_SIZE, y / CELL_SIZE); + self->m_mousereleased(button, x / (CELL_SIZE * CELL_SCALE), y / (CELL_SIZE * CELL_SCALE)); } }