Patch: Virtual Joysticks / Game Controllers

Hello all!

I’ve been working on a new, potential feature for SDL: Virtual Joysticks and Game Controllers. An initial patch is now up on SDL Bugzilla, at https://bugzilla.libsdl.org/show_bug.cgi?id=5028 , along with a description of the feature, some notes on it, and a patch based against SDL 2.0.12. My intended use case for this is to help enable apps to create touch-screen joysticks, with joystick-state and events being retrieve-able through existing SDL APIs.

Commentary on it, or bug reports, are very much welcome! I am happy to discuss this further either in Bugzilla, or here, if people are interested in this!

Cheers!
– David L. Ludwig

Update: this feature is now in SDL HG (https://hg.libsdl.org/SDL), in the “default” branch (for SDL 2.x), though it is currently disabled by default.