mirror of
https://github.com/glfw/glfw.git
synced 2026-09-17 22:32:50 +00:00
Removed glfwGetScrollOffset.
Scroll events do not represent an absolute state, but rather an interpretation of a relative change in state, like character input. So, like character input, there is no sane 'current state' to return. The here removed solution, that of accumulating an offset since the last call to event processing, is at best mildly confusing. If a user wishes to implement this solution, it is better for it to be explicit in client code than implicit in GLFW calls.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user