Joystick support via SDL2 library?

Okay, I made another big refactoring… Sorry :slight_smile:

So, I searched around in the UE4 source and found that there is a built in way to add custom input devices in plugins - the IInputDeviceModule. If the plugin inherits that interface the various F{platform}Application-classes will find it and call it every frame. This means no more JoystickPluginActor, simply enable the plugin and it will generate input events! It seems to work great for me. Have you tried using it for any of your other plugins, getnamo?

Then I figured JoystickPluginComponent isn’t really needed for blueprint events anymore either, so it’s gone too. Inherit the interface like before, but call “Register for Joystick Events” instead, like this:

Finally I added a way to map a device to another player - it works great for split screen games for example.

All in all it means both simpler initial setup and code structure.

I put it here for now: https://github.com/samiljan/UEJoystickPlugin/tree/IInputDeviceModule