Does the API support a way to enumerate connected devices?
Multiple devices can be registered with the InputManager by means of repeated calls to CreateDevice(). I don't see any clear way to verify that a device is in fact a real connected device, though. It seems like no matter how many devices I register of any type (significantly more than are actually present), the variant of the registered device is always DV_STANDARD, never DV_NULL.
Am I thinking about this completely the wrong way, or is there something to check device validity that I'm not seeing, or is this genuinely a missing feature?
You should do it this way: Create all the devices you want to possibly support. Then, if you need to know this, you can call InputDevice::IsAvailable() or InputDevice::GetState() to determine what state the device is in.
Does that help?
It does, sort of. Now I'm getting the same DeviceState for all devices of the same type. Does one device object of a given type govern all devices of that type?
No, it doesn't. Though you may run into limitations as, for example, multiple keyboards are mice are not supported. It should work for gamepads though. What device type are we talking about?
What I'm seeing, after creating five pads, three keyboards, and three mice, with one of each device actually connected, is that all of the keyboards and mice are DS_OK and all of the pads are DS_UNAVAILABLE.
I could have sworn that the pad I was using to test was XInput compatible, but assuming I'm wrong and it's not, is that that the output you would expect to see?
Yes, assuming the pad doesn't work with Xinput that's exactly what I'd expect. What gamepad is it? Do you have any other way to test if it's supported?
I have yet to find an easy, conclusive test for Xinput compatibility. The pad is a Logitech DualAction.
On May 5, 2017 03:00, "Johannes Kuhlmann" [email protected] wrote:
Yes, assuming the pad doesn't work with Xinput that's exactly what I'd expect. What gamepad is it? Do you have any other way to test if it's supported?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jkuhlmann/gainput/issues/33#issuecomment-299396221, or mute the thread https://github.com/notifications/unsubscribe-auth/AKt1hJpi9dsliaSSF29ij9BH7WAZkTPrks5r2sj9gaJpZM4NMqiI .
Googling around a little, it seems like the Logitech Dual Action is not directly supported by Xinput, but there are 3rd party drivers/emulators to make it compatible.