wintab32: Compute our physical device characteristics based on the first tablet device that looks like a stylus.

Otherwise, we may be computing based on a mouse or cursor, and then
come to incorrect values for our tilt and pressure settings.
This commit is contained in:
Jeremy White 2007-12-23 10:56:03 -06:00 committed by Alexandre Julliard
parent 5132ab4693
commit d58429d085
1 changed files with 7 additions and 1 deletions

View File

@ -528,7 +528,13 @@ void X11DRV_LoadTabletInfo(HWND hwnddefault)
if (TRACE_ON(wintab32))
trace_axes(Val);
if (!axis_read_complete)
/* FIXME: This is imperfect; we compute our devices capabilities based upon the
** first pen type device we find. However, a more correct implementation
** would require acquiring a wide variety of tablets and running through
** the various inputs to see what the values are. Odds are that a
** more 'correct' algorithm would condense to this one anyway.
*/
if (!axis_read_complete && Val->num_axes >= 5 && cursor->TYPE == CSR_TYPE_PEN)
{
Axis = (XAxisInfoPtr) ((char *) Val + sizeof
(XValuatorInfo));