[PATCH 1/3] dinput/tests: Make overlapped format tests more robust.
ahiler at codeweavers.com
Tue Aug 3 07:33:41 CDT 2021
On Tue, Aug 03, 2021 at 01:25:16PM +0200, Rémi Bernon wrote:
> On 8/3/21 12:59 PM, Arkadiusz Hiler wrote:
> > On Windows dinput sometimes ignores injected input events, so let's make
> > sure that the event was registered by checking buffered data for the
> > device.
> > Signed-off-by: Arkadiusz Hiler <ahiler at codeweavers.com>
> > ---
> > This series supersedes 210326, 210148, 210147 and 210146.
> > In this revision I use the _DX3 variant of structure for old dinput tests.
> > Thanks Rémi!
> Are the injected events really ignored? This seems more like a timing
> problem, where Acquire operates asynchronously and misses some events when
> they are injected quickly after?
> As far as I can tell, Wine's implementation is synchronous when acquiring a
> device, and we wait for the background thread to complete the hooking (or
> rawinput device registration), but maybe native isn't.
According to my testing we may receive a few events after acquire but
then miss some of them a bit later on.
> Wouldn't it be better to wait for injected events to be received after
> acquiring the device instead of skipping the tests completely?
I don't think it's related to Acquire() being async. Yes, we can
continue firing events until we get one or a timeout happens, hoping
that at least one will reach us, but we can still be extremely unlucky.
More information about the wine-devel