Archived

This topic is now archived and is closed to further replies.

BradDaBug

DirectInput and the mouse

Recommended Posts

BradDaBug    913
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.

Share this post


Link to post
Share on other sites
grasshopa55    128
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

Share this post


Link to post
Share on other sites
CaptainJester    523
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.

Share this post


Link to post
Share on other sites