DirectInput and the mouse
I''m using DirectInput 8 to capture the mouse. I''m using it in relative mode.
I haven''t disabled the Windows cursor, and I''m drawing my own cursor according to the X and Y coords of the mouse, and for some reason the Windows cursor and my cursor don''t match. the Windows cursor is moving lots faster. When I move the mouse fast, the Windows cursor moves farther than my cursor. Why is that? How do I get my cursor to behave like the Windows cursor?
The code is running at 100 FPS, so i don''t think its cause its slow.
The Windows cursor acceleration is being controlled by Windows itself, and not your program. Since the cursor in your program is controlled by you, ie how far you move the cursor when it changes, just try updating your code to speed up the mouse. If you want your mouse cursor to change speeds when you update your Mouse Control Panel, well, you may be out of luck.
-----------------------------
kevin@mayday-anime.com
http://games.mayday-anime.com
-----------------------------
kevin@mayday-anime.com
http://games.mayday-anime.com
That''s why most games that use mouse input have a mouse sensitivity slider. You just mulitply the relative values return by DirectInput by the sensitivity. Typically, this should be a float value between 0 and 3.
---
Make it work.
Make it right.
Make it fast.
---
Make it work.
Make it right.
Make it fast.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement