winex11.drv: Report correctly when wintab is disabled
John Klehm
xixsimplicityxix at gmail.com
Thu Nov 26 00:26:32 CST 2009
Tested with my uclogic WP5540 (thanks again Dan). When plugged in
reported non zero for WTInfo(WTI_DEFSYSCTX, 0, &anyCtx) and when
unplugged reports zero. This patch agrees with the Wintab spec
(report 0 when hardware absent).
Roderick Colenbrander reported issues with SDL code that tripped up
because of this issue. This patch fixes the problem.
Regards,
--John Klehm
-------------- next part --------------
From 2771d018dd41869d482da55992edfa08542da446 Mon Sep 17 00:00:00 2001
From: John Klehm <xixsimplicityxix at gmail.com>
Date: Thu, 26 Nov 2009 00:16:03 -0600
Subject: winex11.drv: Report correctly when wintab is disabled
---
dlls/winex11.drv/wintab.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/winex11.drv/wintab.c b/dlls/winex11.drv/wintab.c
index 30f3e85..c333539 100644
--- a/dlls/winex11.drv/wintab.c
+++ b/dlls/winex11.drv/wintab.c
@@ -1125,8 +1125,12 @@ UINT CDECL X11DRV_WTInfoW(UINT wCategory, UINT nIndex, LPVOID lpOutput)
switch (nIndex)
{
case 0:
- rc = CopyTabletData(lpOutput, &gSysContext,
- sizeof(LOGCONTEXTW));
+ /* report 0 if wintab is disabled */
+ if (0 == gNumCursors)
+ rc = 0;
+ else
+ rc = CopyTabletData(lpOutput, &gSysContext,
+ sizeof(LOGCONTEXTW));
break;
case CTX_NAME:
rc = CopyTabletData(lpOutput, gSysContext.lcName,
--
1.6.4.4
More information about the wine-patches
mailing list