Xinput - Is there no other way?

Hi guys…

Had an older USB joystick… Worked in windows 8, but not usable by monogame…

Just got my hands on an almost new thrustmaster stick… Same problem… Even though its still sold on their website, so fairly modern i guess…

… Is there no way to get input from regular ‘non-Xinput’ controllers? -Since windows 8 already gets the input anyways?.. Why cant I tap those values from within my game?

Why would windows take input from my jystick, but then not let me use those values in XNA?

I believe Input.GamePad uses Xinput and is limited to XBOX style controllers, while Input.Joystick is the non-Xinput method that can support any controller. I haven’t done a lot with controller support, I mainly do keyboard stuff, so I may be mistaken.

you’re mistaken unfortunately…

Neither varient works for me…

I actually thought monogame games got stuff like system time and inputs from the OS…

In any case, I cant believe there is no way to get regular usb non-xinput controller input in monogame…
There MUST be a way to program for generic input devices…

I just hate when these things happen, and a billion consumers are forced to buy another pile of plastic that does the exact same thing the old one did… It just CANT be true…

MonoGame uses XInput in DirectX, just like almost every game released on Windows over the last several years. I’m not sure what OpenTK uses behind the scenes on Windows for the OpenGL version.

When you say, “Worked in windows 8, but not usable by monogame”, do you mean it works in the Control Panel applet for setting up game controllers? Does it work in commercially released games?

Windows has provided several APIs to access game controllers over the years. It started with the Multimedia API (WinMM). This was replaced by DirectInput many years ago, which was then replaced by XInput. For a while, many games supported both DirectInput and XInput, but now the use of DirectInput is not recommended.

Thanks for your reply!

Yes, it means I can configure it using the windows tool, including the throttle and hat… And I got it from a recently trained pilot who had been using it in those regularly available commercial flight sims…

I would use a “if detected” statement to make sure the not recomended code only ran as a last resort, for people like myself…

Is this all a scheme to sell more MS controllers? What was wrong with our USB joysticks 5 years ago?

-But seriously, Mr. developer sir, can I poll windows for the joystick input? Since it already gets the data?

[quote=“monopalle, post:5, topic:2543”]
Is this all a scheme to sell more MS controllers? What was wrong with our USB joysticks 5 years ago?
[/quote]Anyone can make a claim about the intentions of Microsoft in changing APIs, but it is just a claim.

[quote=“monopalle, post:5, topic:2543”]
-But seriously, Mr. developer sir, can I poll windows for the joystick input? Since it already gets the data?
[/quote]See here for a summary of the difficulties in supporting joysticks on Windows. It may seem easy from the outside, but it’s not always so simple.