Weird Issue

Sep 23, 2011 at 8:01 PM

I've recently started porting my project to really use the framework + NInject for dependancy injection (makes life so much easier) and tried deploying it to XBOX tonight for the first time - Everything works great on my laptop but but on xbox i don't seem to get any controller input. I've even done this 

#if !XBOX           
//Application.Input.PlayerOne.UseKeyboardMouseInput = true;

just to be sure, I'm being lazy at the moment and just using Input.PlayerOne and haven't pulled in the session managment stuff, but stepping through the code it's the only controller which has it's connected flag set to true (and the only controller i'm using). Am i doing something horrendously stupid ?

Sep 23, 2011 at 8:47 PM

Yesterday i have deploying my project to my XBOX too and i had the same issue. 

I thought this issue was my code but, if you have the same, it's probably an error on the indie freaks framework.

I will look in more details soon too.

Sep 25, 2011 at 10:56 AM


I cannot step through the Xbox builds right now (I lend my Xbox 360 to a friend for the week end) but I can't think why it wouldn't work. Note that you don't need to get Session used in your game to get InputManager to work.

As soon as I get it back, I'll debug step by step the InputManager initialization and get back to you.

Until then, would you please create a Workitem for this issue so that we can track its status?


Sep 25, 2011 at 4:54 PM

The problem is in PlayerInput.Update

The conditional code sections don't ever call UpdateState for XBOX, I added a section as follows

            if (UseKeyboardMouseInput)
                ControlInput = ControlInput.KeyboardMouse;

                UpdateState(tick, _kms, _kmb);


            ControlInput = (ControlInput)PlayerIndex;

            UpdateState(tick, GamePad.GetState(PlayerIndex, DeadZone));      

#elif XBOX
            ControlInput = (ControlInput)PlayerIndex;

            UpdateState(tick, GamePad.GetState(PlayerIndex, DeadZone));  
            ControlInput = ControlInput.TouchPanel;
and everything now works fine

Sep 25, 2011 at 10:34 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.