Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am having some trouble to receive and interpret mouse movement data from RawInput. Generally mouse input seems to work, I can query mouse buttons and receive updates of mouse movement.

The problem is that data.mouse.lLastX and data.mouse.lLastX are both 0 if the data is relative. However when the data is absolute there is no problem. Does anybody know how this can happen?

Let me know if you need some code in order to help.

share|improve this question
When are the values 0? If it's set to relative, those numbers will be 0 if the mouse did not move the since the last time an update occurred. – Byte56 Jan 28 '13 at 21:09
This happens as soon as I move the mouse. Then a WM_INPUT message is coming in and the values are 0. RawInput definitely recognizes a mouse move but doesn't give me the x ynd y values at all – elramino Jan 29 '13 at 13:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.