[RFC PATCH] dinput: Introduce new HID joystick backend.

Zebediah Figura (she/her) zfigura at codeweavers.com
Thu Jun 17 11:40:09 CDT 2021


On 6/1/21 4:09 AM, Rémi Bernon wrote:
> Sending this as RFC because I'm not completely sure how to proceed (and
> also because ideally it would depend on 206872 which is not merged yet).
> 
> The problem is that this new backend will fail most dinput(8) tests
> until it's more properly implemented, although the testbot doesn't have
> HID devices to test with.
> 
> It could also cause issues if the new backend is enumerated and somehow
> is selected by default for some reason.
> 
> Either we don't really care, or the new backend could be conditionally
> enabled with a configure flag?

For whatever it's worth, this strikes me as a good idea.

Probably what should be done is to deprioritize or even explicitly 
disable this backend in the registry until it's ready to work, at which 
point we can make it the default, keeping the old backends around until 
all the bugs get ironed out. I don't know whether it's worth completely 
disabling it just to make the tests pass for the TestBot and Alexandre; 
I guess I'll leave that one to them.

Of course, introducing a switch like that is a good way to ensure that 
concerned users always turn it off, and that the new backend never 
really gets tested, but it would be unfair to offer no way to revert to 
the old behaviour...

(Side note: looking at this patch shows me just how ugly the 
IDirectInputDevice8WVtbl implementation is. If it's really worth sharing 
all that code, I'd advocate for using a struct dinput_device_ops instead...)



More information about the wine-devel mailing list