Jump to content
Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.
Posted 12 June 2012 - 02:59 PM
Posted 13 June 2012 - 04:33 PM
Edited by Khatharr, 13 June 2012 - 04:35 PM.
Posted 13 June 2012 - 05:22 PM
Edited by Erlex, 13 June 2012 - 05:23 PM.
Posted 13 June 2012 - 05:27 PM
No, actually DInput just runs a message loop for keyboard and mouse input in a separate thread.
DInput bypasses the winproc. It reads the device state from the hardware rather than from windows messaging, so no worries there.
Edited by Washu, 13 June 2012 - 05:29 PM.
In time the project grows, the ignorance of its devs it shows, with many a convoluted function, it plunges into deep compunction, the price of failure is high, Washu's mirth is nigh.
ScapeCode - Blog | SlimDX
Posted 13 June 2012 - 09:11 PM
Posted 14 June 2012 - 12:48 AM
pJoystick->SetCooperativeLevel(m_hWnd, DISCL_EXCLUSIVE | DISCL_BACKGROUND);and you'll be getting input even when your application is without focus.
DirectInput is completely fine for joysticks and other game controllers. It is not recommended by Microsoft for mouse and keyboard. And Microsoft also recommends XInput instead of DirectInput, BUT read my next paragraph below...
As for using XInput instead of DirectInput, a lot of the affordable books out there still refer to DirectInput. Frankly my experience so far has been that anything Microsoft puts out is deprecated 3 days prior to its release. Maybe that's just me. Either way, DirectInput still works. Once you're on your feet you can pick up XInput later.
That doesn't sound like Microsoft not recommending to use DirectInput at all, does it?
By supporting XInput only, your game will not work with legacy DirectInput devices. XInput will not recognize these devices.
If you want your game to support legacy DirectInput devices, you may use DirectInput and XInput side by side. When enumerating your DirectInput devices, all DirectInput devices will enumerate correctly. All XInput devices will show up as both XInput and DirectInput devices, but they should not be handled through DirectInput. You will need to determine which of your DirectInput devices are legacy devices, and which are XInput devices, and remove them from the enumeration of DirectInput devices.
Edited by Tom KQT, 14 June 2012 - 12:49 AM.
Posted 15 June 2012 - 01:08 PM
Posted 19 June 2012 - 08:12 PM
Posted 20 June 2012 - 03:27 AM
It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.
GameDev.net™, the GameDev.net logo, and GDNet™ are trademarks of GameDev.net, LLC.