Jump to content
  • Advertisement
Sign in to follow this  
stenny

Multiple LPDIRECTINPUT8 - is this bad?

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

Hey there, I was wondering if it is bad to DirectInput8Create() multiple LPDIRECTINPUT8's. I've got an InputDevice class with an initializationfunction that's supposed to take care of all DirectInput stuff. Is there a problem with calling DirectInput8Create() everytime the initializationfunction's called (thus everytime a new inputdevice is created), or do I need to build a manager class and put the LPDIRECTINPUT8 interface in there? I know the latter's better design, I'm just wondering whether it can damage you application to create multiple LPDIRECTINPUT8's. Sorry for being a bit vague-ish, but I hope you can help me out. - Stijn

Share this post


Link to post
Share on other sites
Advertisement
You'd advise against DirectInput in the first place, hmm? Then what'd be a better option (knowing that 'better' is of course a relative term in the programming business)?

Thank for helping out ;)

Share this post


Link to post
Share on other sites
Quote:
Original post by stenny
You'd advise against DirectInput in the first place, hmm? Then what'd be a better option (knowing that 'better' is of course a relative term in the programming business)?

Thank for helping out ;)
For keyboard or mouse input, just use Window messages (WM_KEYUP, MW_KEYDOWN, WM_CHAR, WM_MOUSEMOVE, etc). If you really need high-DPI mouse input, then you should use raw input.

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!