Multiple LPDIRECTINPUT8 - is this bad?
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
I'd advise against it, it's likely to have more of an overhead that way. Also, I hope you're not using DirectInput for keyboard or mouse input...
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 ;)
Thank for helping out ;)
Quote:Original post by stennyFor 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.
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 ;)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement