From 302276dc1b90cfc972fb726ca94a23b18f4b0088 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Tue, 1 Feb 2022 15:24:35 +0100 Subject: New upstream version 1.1.1 --- backend/pieusb.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'backend/pieusb.c') diff --git a/backend/pieusb.c b/backend/pieusb.c index a070fc0..f8dc073 100644 --- a/backend/pieusb.c +++ b/backend/pieusb.c @@ -110,6 +110,8 @@ extern void write_tiff_rgbi_header (FILE *fptr, int width, int height, int depth /* device flags */ #define FLAG_SLIDE_TRANSPORT 0x01 +/* Some scanners do understand SLIDE_TRANSPORT but not CMD_17 - introducing a new flag */ +#define FLAG_CMD_17_NOSUPPORT 0x02 /* -------------------------------------------------------------------------- * @@ -163,7 +165,6 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback __sane_unused__ authorize DBG (DBG_info_sane, "sane_init() build %d\n", BUILD); /* Set version code to current major, minor and build number */ - /* TODO: use V_MINOR instead or SANE_CURRENT_MINOR? If so, why? */ if (version_code) *version_code = SANE_VERSION_CODE (SANE_CURRENT_MAJOR, SANE_CURRENT_MINOR, BUILD); @@ -1004,10 +1005,12 @@ sane_start (SANE_Handle handle) /* ---------------------------------------------------------------------- * * Function 17 + * This function is not supported by all scanners which are capable of + * slide transport, therefore FLAG_CMD_17_NOSUPPORT was introduced. * * ---------------------------------------------------------------------- */ - if (scanner->device->flags & FLAG_SLIDE_TRANSPORT) { + if ( (scanner->device->flags & FLAG_SLIDE_TRANSPORT) & !(scanner->device->flags & FLAG_CMD_17_NOSUPPORT) ) { sanei_pieusb_cmd_17 (scanner->device_number, 1, &status); if (status.pieusb_status != PIEUSB_STATUS_GOOD) { DBG (DBG_error, "sane_start(): sanei_pieusb_cmd_17 failed: %d\n", status.pieusb_status); -- cgit v1.2.3