Archived

This topic is now archived and is closed to further replies.

Two direct input controllers?

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

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites