# Issue with raw mouse motion

**URL:** <https://discourse.glfw.org/t/issue-with-raw-mouse-motion/1685>\
**Category:** support\
**Created:** [October 30, 2020, 2:10pm UTC](https://discourse.glfw.org/t/issue-with-raw-mouse-motion/1685 "2020-10-30T14:10:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![whitwhoa](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/whitwhoa/32/425_2.png) [@whitwhoa](https://discourse.glfw.org/u/whitwhoa)\
**Post date:** [October 30, 2020, 2:10pm UTC](https://discourse.glfw.org/t/issue-with-raw-mouse-motion/1685/1 "2020-10-30T14:10:29Z")

</div>

I have enabled raw mouse motion via:

```
glfwSetInputMode(this->glfwWindow, GLFW_CURSOR, GLFW_CURSOR_DISABLED);
				glfwSetInputMode(this->glfwWindow, GLFW_RAW_MOUSE_MOTION, GLFW_TRUE);

```

And it works great on 2/3 machines I have run my application on. However, the third it does not seem to have an effect. I verified that it is supported via:

```
glfwRawMouseMotionSupported()

```

And the command returns true, but it’s clearly visible that it is not functioning as expected. I was just curious if anyone might have any recommendations or ideas on how I might better trouble shoot this?

---

<div class="post-metadata">

**Author:** ![dougbinks](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/dougbinks/32/39_2.png) [@dougbinks](https://discourse.glfw.org/u/dougbinks)\
**Post date:** [November 1, 2020, 3:41pm UTC](https://discourse.glfw.org/t/issue-with-raw-mouse-motion/1685/2 "2020-11-01T15:41:43Z")

</div>

> [@whitwhoa](#):
>
> it’s clearly visible that it is not functioning as expected

What is the issue you are seeing?

> [@whitwhoa](#):
>
> any recommendations or ideas on how I might better trouble shoot this?

First I would check the GLFW test [cursor.c](https://github.com/glfw/glfw/blob/master/tests/cursor.c) which can be set to disabled cursor with `D` and then raw mouse with `R`. This would be best done with latest code form Github.

For further debugging, this depends on the platform. On Windows I would put breakpoints in the `WM_INPUT` handling code:

> <https://github.com/glfw/glfw/blob/master/src/win32_window.c#L862-L911>

If you still have issues, or if you think you’ve found a problem with GLFW, let us know here.

Cheers,

Doug.

---

<div class="post-metadata">

**Author:** ![whitwhoa](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/whitwhoa/32/425_2.png) [@whitwhoa](https://discourse.glfw.org/u/whitwhoa)\
**Post date:** [November 2, 2020, 8:23pm UTC](https://discourse.glfw.org/t/issue-with-raw-mouse-motion/1685/3 "2020-11-02T20:23:51Z")

</div>

> What is the issue you are seeing?

I’ve got an FPS camera setup where the mouse controls camera pitch/yaw. For the longest time I was running into an issue where when moving the mouse the screen would appear to skip frames. It was then pointed out that I needed to enable RAW\_MOUSE\_MOTION to insure I was receiving mouse position unaltered by windows. After doing this it completely solved the issue (for 2/3 machines). When testing on the third machine, the issue persists and RAW\_MOUSE\_MOTION does not seem to make a difference (as I get the same results with it enabled as I do with it disabled on this machine).

I will do some testing with the cursor.c example as you suggested and report back my findings. Greatly appreciate the suggestions!

---

<div class="post-metadata">

**Author:** ![whitwhoa](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/whitwhoa/32/425_2.png) [@whitwhoa](https://discourse.glfw.org/u/whitwhoa)\
**Post date:** [November 3, 2020, 5:44pm UTC](https://discourse.glfw.org/t/issue-with-raw-mouse-motion/1685/4 "2020-11-03T17:44:19Z")

</div>

After compiling and running the cursor test application, I did confirm that the behavior was not affected by enabling/disabling raw mouse motion for this machine. However, testing on another machine it worked exactly as expected. I then got the idea to load up half-life on this machine to see if I would experience the same issue in-game…and I did. Therefore this issue has nothing to do with GLFW, but some oddity with this specific machine. Thinking maybe the usb drivers may somehow be causing this (as i’ve tried multiple mice to no avail). It’s definitely strange.
