mirror of
https://github.com/glfw/glfw.git
synced 2026-02-17 21:12:34 +01:00
Rename raw input to raw mouse motion, cleanup
This renames 'raw input' to 'raw mouse motion' as there are other kinds of raw input. The update path is restructured to avoid reinitializing all of disabled cursor mode. Modification of shared state is moved out into shared code. Raw mouse motion is disabled by default for compatibility. Related to #1401.
This commit is contained in:
@@ -164,14 +164,17 @@ static void key_callback(GLFWwindow* window, int key, int scancode, int action,
|
||||
break;
|
||||
|
||||
case GLFW_KEY_R:
|
||||
if (glfwGetInputMode(window, GLFW_RAW_INPUT))
|
||||
if (!glfwRawMouseMotionSupported())
|
||||
break;
|
||||
|
||||
if (glfwGetInputMode(window, GLFW_RAW_MOUSE_MOTION))
|
||||
{
|
||||
glfwSetInputMode(window, GLFW_RAW_INPUT, GLFW_FALSE);
|
||||
glfwSetInputMode(window, GLFW_RAW_MOUSE_MOTION, GLFW_FALSE);
|
||||
printf("(( raw input is disabled ))\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
glfwSetInputMode(window, GLFW_RAW_INPUT, GLFW_TRUE);
|
||||
glfwSetInputMode(window, GLFW_RAW_MOUSE_MOTION, GLFW_TRUE);
|
||||
printf("(( raw input is enabled ))\n");
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user