summaryrefslogtreecommitdiff
path: root/backend/pieusb.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2022-02-01 15:26:02 +0100
committerJörg Frings-Fürst <debian@jff.email>2022-02-01 15:26:02 +0100
commit5de81480e84023d91763d89e4523de88df42c194 (patch)
treecb83e4c8216cf0e8bcaa17a6f2cb64cf4d7f469a /backend/pieusb.c
parent97e55bdc5cdf59304af739e65f416320bcbcf599 (diff)
parent8e5d399808d2270ae9d56c96560a021e594d18a4 (diff)
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'backend/pieusb.c')
-rw-r--r--backend/pieusb.c7
1 files changed, 5 insertions, 2 deletions
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);