Jump to content
  • Advertisement
Sign in to follow this  
QQemka

Directinput - mouse centerd after losing window focus

This topic is 827 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello. I got a problem with Directinput. All the keydowns, info about mouse xy movement are working fine. But there is one huge problem i cant fix:

When i focus game window the mouse is ALWAYS placed in the center of game window. When i unfocus window (lets say pressing start button) the mouse is relocated to the point where i last placed it before focusing game window. And again, if i select the game it will again put cursor in the middle, and so on.

Other issue with focus/unfocus. when game is in background my UpdateScene function is constantly receiving info from last state. So if i unfocus the game while holding right button and moving the mouse, then for entire time in backgroudn the game is receiving this input, to the moment i focus window again.

This is sooo annoying, what can i do about it?

 

Greetz

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!