[Bug 8320] DirectInput joystick timestamps are wrong

Wine Bugs wine-bugs at winehq.org
Tue May 8 23:12:22 CDT 2007


http://bugs.winehq.org/show_bug.cgi?id=8320





------- Additional Comments From hoof at users.sourceforge.net  2007-08-05 23:12 -------
I made a workaround for my app, but the bad timestamps will break apps that
depend on them.  Say you have a simulation that can only render at 10hz, but
runs its physics at 100hz.  Every 100ms it will run 10 physics steps.  For the
first step, it will only consider joystick events that happened before
timeGetTime()-90ms, for the next step it will consider events before
timeGetTime()-80ms and so on.  With the timestamps as they are now, an app that
works like that will end up ignoring joystick events because the timestamp says
the event hasn't happened yet.

To get it right wine has to record the GetTickCount() time when the joystick is
opened and the timestamp from the linux joystick's JS_EVENT_INIT and then
subtract the difference between the two from each subsequent joystick event
timestamp.

If that is too much trouble, it would probably be better to ignore the linux
joystick timestamps entirely and just use the current time.  At least it won't
be off by days then.


-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the wine-bugs mailing list