This project is read-only.

XInput not doing anything?

Feb 11, 2012 at 5:12 PM


I'm trying to use XInput to map a pc controller to my XNA game.  The issue I'm having is that whilst the controller is detected, no button presses are, not even in ExtendedButtonState.  I was using a PS2 controller with an adapter (worked well with soopah), but thought this might be the issue so I just went out and bought a bog standard pc controller, still no luck.  Am I missing something here?  


Visual Studio 2010

.NET 4.0

this.GamePad = inputManager.GamePads[playerIndex];


this.GamePad.GetState() (OR) this.GamePad.GetExtendedState()

I'm expecting to see button presses and analogue stick movement, but get nothing!


isAttached is true, so it's definitely being detected.  I hope I'm just missing some initialisation that I should have done but forgot...


Any help you could give me would be very much appreciated!

Feb 11, 2012 at 5:20 PM

Fastest self answer ever?


this.inputManager = new InputManager(Services, Window.Handle);           

****Components.Add(this.inputManager);**** <-- This was missing in my code... duhhh...


Right, since I'm now clearly going to be seen as a dumbass for having to post the question online to read through my code properly I'm going to go and cry...


Cool framework btw, very, very interesting...