Two direct input controllers?

Started by
4 comments, last by bcnyz 21 years ago
Using direct input action mapping, is it possible to specify one set of controls for a first controller, and another if there is a second? I am trying to do this for a two player game and using the D3DApp framework. Cheers
Advertisement
It depends on what you mean by ''second'' controller. Practically all PC''s will have at least two controllers, i.e. keyboard and mouse.

If you intend to map some controls to a keyboard and some optional ones to a joystick (if present) then you can set this behavior in the action map itself.

If instead you intend to map some controls onto a joystick, and optional controls onto a second joystick (if found), then you could probably add some logic into the device enumeration callback function to do this.
I want to do this for two joysticks. The mouse and keyboard have other controls.
The only thing I can think of is to have different action formats for the two gamepads/joysticks. But then they could not both be configured by the user through the ConfigureDevices function.
I think from what you''ve said, you can use the ''Multimapper'' sample from the SDK as long as both players will have the same actions available. This should be true for practically all games. This lets both players reconfigure their controls using the built-in interface too.
Thanks, I don''t know how I did not see that sample.

This topic is closed to new replies.

Advertisement