I’m using the standard Microsoft Xbox gamepad that I already use to play games both in Ubuntu and Windows, but I’m developing in Ubuntu with MonoDevelop 4 and MonoGame 3.5 as I prefer to work in a Linux environment.
I’ve been trying with little tests under both XNA (across all
PlayerIndex values) and OpenTK (across indices 0 - 3). The gamepad is definitely connected; I just used it to play a little TowerFall. But for some reason, none of the
GamePadStates I’ve been testing against are showing a connected controller.
What’s going on? How do I troubleshoot what’s going on?
Sorry for the delay. I was pretty busy catching up on things over the last week.
Wired. And… Xpad, I think? Whichever one is default. I never manually installed a driver.
@harry-cpp : Just confirmed, Ubuntu 14.04 comes with xpad by default.
Try getting the state from Joystick.GetState() OpenTK.Input.Joystick…
If that doesn’t find your gamepad than there is an error in OpenTK.
If that finds your gamepad than it’s probably that OpenTK is missing the config in: https://github.com/opentk/opentk/blob/develop/Source/OpenTK/Input/GamePadConfigurationDatabase.cs
So, I revisted my gamepad debug code, and added a collection of
JoystickStates to check alongside the
GamePadStates I was already checking. I don’t know what happened but… Somehow, OpenTK is detecting the gamepad now, with both
As far as I can tell, I haven’t changed anything. My gamepad is plugged into the same port, the 1p light is on as it was before. But… it works? My output all looks right. Even XNA is picking it up now.
It makes me a little nervous as a developer to leave this thread hanging, but I suppose it’s best to just leave the problem alone when it’s no longer replicable. I’ll bump this later if the problem returns.