[dinput] shared input for multiple windows?

Started by
0 comments, last by Axiverse 18 years, 7 months ago
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?
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..

This topic is closed to new replies.

Advertisement