DirectInput and the mouse

Started by
1 comment, last by BradDaBug 22 years, 4 months ago
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.
I like the DARK layout!
Advertisement
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.comhttp://www.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.
"None of us learn in a vacuum; we all stand on the shoulders of giants such as Wirth and Knuth and thousands of others. Lend your shoulders to building the future!" - Michael Abrash[JavaGaming.org][The Java Tutorial][Slick][LWJGL][LWJGL Tutorials for NeHe][LWJGL Wiki][jMonkey Engine]

This topic is closed to new replies.

Advertisement