On Thu, Apr 16, 2015 at 08:11:39AM -0500, Aric Stewart wrote:
Now completely unresearched but it may be possible to make a single joystick driver, maybe replacing winejoystick.drv that would build only the platform code that is relevant.
This makes sense to me, and is how dinput already works. Make some sane API for it and build dinput/winmm/xinput on top of that.
but before I do another big chunk of work I am seeking some community buy-in and not just discuss with with Alexandre. I understand if the USB driver path gets actually fleshed out and we try to support Joysticks via that then all this separate driver work would fall away and be replaced.
I may be misunderstanding something, but I think the USB thing is an entirely separate issue, and in the distant future anyway. It doesn't concern me.
We of course need to make sure we come up with a plan that Alexandre will approve of. Would a replacement winejoystick.drv that holds all the platform specific code be acceptable? Is there a case where we would want that driver to be able to build multiple platform code? Maybe Linux and Linux Input? I will admit I am pretty ignorant of the Linux side of this whole situation.
The driver should just provide all backends that are supported by the OS. dinput currently does this, and builds both linux and linuxinput.
We might even be able to drop the non-input Linux path entirely. I'm not sure if anyone still needs it (maybe BSD?). The event interface has been around much longer than ten years, and I think duplicating devices (/dev/jsX == /dev/input/eventY) just causes user and application confusion. I've disabled the non-input Linux driver in some of our game ports, especially those with FFB, and haven't heard any complaints.
Andrew