Archived

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

superpig

Jerky mouse movement in fullscreen

Recommended Posts

superpig    1825
Hey, I''m writing something based on the DirectX AppWizard, using DirectInput Action Mapping (a first for me). The game I''m writing is a flight-sim type thing. I''ve got two axis set up, mapped to MOUSE_X and MOUSE_Y. The axis ranges are set to +/- 1000, and when checking for input the axis values get divided by 1000, (supposedly) producing a medium-precision value between 1 and -1. In windowed mode, everything works fine - my avatar pitches and rolls smoothly. But when I switch to fullscreen mode, it only seems to move in 5-degree increments or so, on both axis in both directions. I''m still getting a framerate of 60fps (locked to my monitor), so it''s not jerky due to that. Anyone know why it might be doing this in fullscreen mode and not windowed mode, or how I might go about fixing it? Thanks in advance... Superpig - saving pigs from untimely fates, and when he''s not doing that, runs The Binary Refinery.

Share this post


Link to post
Share on other sites
superpig    1825
*bump*

Please? It''s in your own best interests, you know - helping a really fun game come into the world. It''s like helping to deliver a baby. You like babies, don''t you?

Superpig
- saving pigs from untimely fates, and when he''s not doing that, runs The Binary Refinery.

Share this post


Link to post
Share on other sites
randal    156
hmm.. unfortunetly I don''t have anything that could help, I have the same problem (just using cursor for menus). For the time being I put a Sleep(5); in the gameloop and that has smoothed the mouse movement. Experiment with that to see if it''s a simular problem, might help you come up with a good solution.

Share this post


Link to post
Share on other sites
superpig    1825
Sleep(5), eh? Hmm... IIRC, Sleep() surrenders to other threads, so it may be the DirectInput threads aren''t being given enough time; or it may be the mouse isn''t sending data fast enough or something. Weird.

I''ll try your solution and see what happens. Thanks.

Superpig
- saving pigs from untimely fates, and when he''s not doing that, runs The Binary Refinery.

Share this post


Link to post
Share on other sites
RavNaz    100
ooohhhh your so close...

Whack in Sleep(0), that gives windows time to catch up, and everything is hunkey dorey.

I''m amazed that commercial games leave this problem in, when there is such a simple fix.

Sloppy sloppy sloppy.

Share this post


Link to post
Share on other sites