Jump to content
  • Advertisement
Sign in to follow this  
supagu

[dinput] shared input for multiple windows?

This topic is 4655 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

my engine supports multiple windows, the thing is when you create the dinput device, you need to pass in some hwnd variable from your window (SetCooperativeLevel). i would like to support multiple windows but would also like my input class to be a singleton. my idea is to have a Input::SetActiveWindow method to set which window the input is for, this method would call: SetCooperativeLevel so im wondering if this method is cheap enough to call multiple times per frame? i assume this method also tells dinput which window to query the input from?

Share this post


Link to post
Share on other sites
Advertisement
What do you mean? Do you mean having multiple windows all recieve copies of the same input? If so then you just pass copies to the function that handles input. Otherwise, if you mean that whatever window is active, then you can set it to foreground only and reset the device everytime the window changes..

Share this post


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

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!