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

This commit is contained in:
Jeremy White 2009-02-09 13:01:09 -06:00 committed by Alexandre Julliard
parent 8dee7519c6
commit 22bab0aa3d
1 changed files with 5 additions and 0 deletions

View File

@ -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;
}