I tested the code that EHaskins provided me and it can read every USB gamepad. I developed code so it can show which buttons are being pressed, but it only works if each gamepad is under a timer. The timer is used to refresh the labels which each button is assigned to change. The problem that I get in the code is in this line:
Code:
SlimDX.DirectInput.Joystick stick = new SlimDX.DirectInput.Joystick(Input. device.InstanceGuild);
I declared this line at the beginning of the code and it gives me an error with "device" and "Input". The errors read: “A field initializer cannot the reference the non-static field, method, or property” for both. So my question is why isn’t Input and device being referenced?