diff --git a/include/GL/glfw3.h b/include/GL/glfw3.h index c76077f8..2f21e5f2 100644 --- a/include/GL/glfw3.h +++ b/include/GL/glfw3.h @@ -1377,10 +1377,6 @@ GLFWAPI void glfwGetCursorPos(GLFWwindow* window, int* xpos, int* ypos); */ GLFWAPI void glfwSetCursorPos(GLFWwindow* window, int xpos, int ypos); -/*! @ingroup input - */ -GLFWAPI void glfwGetScrollOffset(GLFWwindow* window, double* xoffset, double* yoffset); - /*! @brief Sets the key callback. * @param[in] window The window whose callback to set. * @param[in] cbfun The new key callback, or @c NULL to remove the currently diff --git a/src/input.c b/src/input.c index ddd909f6..a45a6223 100644 --- a/src/input.c +++ b/src/input.c @@ -160,9 +160,6 @@ void _glfwInputChar(_GLFWwindow* window, int character) void _glfwInputScroll(_GLFWwindow* window, double xoffset, double yoffset) { - window->scrollX += xoffset; - window->scrollY += yoffset; - if (window->callbacks.scroll) window->callbacks.scroll((GLFWwindow*) window, xoffset, yoffset); } @@ -370,23 +367,6 @@ GLFWAPI void glfwSetCursorPos(GLFWwindow* handle, int xpos, int ypos) _glfwPlatformSetCursorPos(window, xpos, ypos); } -GLFWAPI void glfwGetScrollOffset(GLFWwindow* handle, double* xoffset, double* yoffset) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - - if (!_glfwInitialized) - { - _glfwInputError(GLFW_NOT_INITIALIZED, NULL); - return; - } - - if (xoffset) - *xoffset = window->scrollX; - - if (yoffset) - *yoffset = window->scrollY; -} - GLFWAPI void glfwSetKeyCallback(GLFWwindow* handle, GLFWkeyfun cbfun) { _GLFWwindow* window = (_GLFWwindow*) handle; diff --git a/src/internal.h b/src/internal.h index f0e4a783..8ddcfa83 100644 --- a/src/internal.h +++ b/src/internal.h @@ -221,7 +221,6 @@ struct _GLFWwindow GLboolean stickyMouseButtons; int cursorPosX, cursorPosY; int cursorMode; - double scrollX, scrollY; char mouseButton[GLFW_MOUSE_BUTTON_LAST + 1]; char key[GLFW_KEY_LAST + 1]; diff --git a/src/window.c b/src/window.c index 0780b2cc..e61041c5 100644 --- a/src/window.c +++ b/src/window.c @@ -48,22 +48,6 @@ static int Max(int a, int b) } -//======================================================================== -// Clear scroll offsets for all windows -//======================================================================== - -static void clearScrollOffsets(void) -{ - _GLFWwindow* window; - - for (window = _glfw.windowListHead; window; window = window->next) - { - window->scrollX = 0; - window->scrollY = 0; - } -} - - ////////////////////////////////////////////////////////////////////////// ////// GLFW event API ////// ////////////////////////////////////////////////////////////////////////// @@ -746,8 +730,6 @@ GLFWAPI void glfwPollEvents(void) return; } - clearScrollOffsets(); - _glfwPlatformPollEvents(); } @@ -759,8 +741,6 @@ GLFWAPI void glfwWaitEvents(void) return; } - clearScrollOffsets(); - _glfwPlatformWaitEvents(); }