Jeremy White : sane.ds: Return a 0 for MSG_QUERYSUPPORT even for capabilities we don't support.

Alexandre Julliard julliard at winehq.org
Tue Feb 10 07:45:30 CST 2009


Module: wine
Branch: master
Commit: 22bab0aa3dce10c84efb08bc01ada949b2a9da0e
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=22bab0aa3dce10c84efb08bc01ada949b2a9da0e

Author: Jeremy White <jwhite at winehq.org>
Date:   Mon Feb  9 13:01:09 2009 -0600

sane.ds: Return a 0 for MSG_QUERYSUPPORT even for capabilities we don't support.

---

 dlls/sane.ds/capability.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/dlls/sane.ds/capability.c b/dlls/sane.ds/capability.c
index 1755b6c..e68bc80 100644
--- a/dlls/sane.ds/capability.c
+++ b/dlls/sane.ds/capability.c
@@ -259,5 +259,10 @@ TW_UINT16 SANE_SaneCapability (pTW_CAPABILITY pCapability, TW_UINT16 action)
             break;
     }
 
+    /* Twain specifies that you should return a 0 in response to QUERYSUPPORT,
+     *   even if you don't formally support the capability */
+    if (twCC == TWCC_CAPUNSUPPORTED && action == MSG_QUERYSUPPORT)
+        twCC = set_onevalue(pCapability, 0, TWTY_INT32);
+
     return twCC;
 }




More information about the wine-cvs mailing list