Java: How to emulate a XInput gamepad/controller?

5k views Asked by At

I would like to emulate an XInput gamepad (controller) using Java. I've searched around the net but I couldn't really find any solution for my problem. Is it possible to simulate an XInput controller using Java?

I'm currently playing a game called Assetto Corsa, this game doesn't support the gamepad I'm currently using. This is why I would like to create a little program that simulates an XInput controller based on the current controller I'm using.

There are libraries available like JXInput that allow you to use XInput controllers in java, but I would like to have it the other way around. I couldn't find any solution for this on their pages.

2

There are 2 answers

3
user2963623 On

What you are proposing can be done. In fact I used one few years back to play with a non XINPUT device. Search the internet.

Check this out https://code.google.com/p/x360ce/

1
Jakob91 On

I tried x360ce using Assetto Corsa but once you load a track the frame pause every 1 or 2 seconds and it's completely unplayable for me. I play with a g27 and an old xbox type-s gamepad (no xinput) and the only way I found to use a non-xbox360 xinput controller is to set the controls to Wheel/Custom. I'll give you my settings it might fix it for you as well!

Steering settings:

Gamma: 1.8 - Filter: 0.25 - Speed Sensitivity: 0.05

Let's hope at a later date Normal gamepads will be supported as the game is surprisingly even without a wheel although less precise, especially for braking and for tight cornering.