[wintab32 6/7] Compute our physical device characteristics based on the first tablet device that looks like a stylus.
Jeremy White
jwhite at winehq.org
Sun Dec 23 10:56:03 CST 2007
Otherwise, we may be computing based on a mouse or cursor, and then come to incorrect
values for our tilt and pressure settings.
---
dlls/winex11.drv/wintab.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/dlls/winex11.drv/wintab.c b/dlls/winex11.drv/wintab.c
index 112b864..288a2a2 100644
--- a/dlls/winex11.drv/wintab.c
+++ b/dlls/winex11.drv/wintab.c
@@ -510,7 +510,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));
--
1.5.3.7
More information about the wine-patches
mailing list