WSD: fixed "scan-intent" option handling on ADF Duplex source

Unlike eSCL, WSD scanners define their input capabilities not as
ADFSimplex/ADFDulpex, but as ADFFront/ADFBack, where ADFBack
element is optional.

If both elements are present, we assume that ADFDuplex capabilities
are result of devcaps_source_merge() capabilities, which fund subset
of capabilities, supported by both sources.

By mistake, devcaps_source_merge() didn't handle scan intents properly,
so intents were lost for the "ADF Duplex" source.
This commit is contained in:
Alexander Pevzner
2025-03-17 15:21:23 +03:00
parent ebd63ecdda
commit ea47cbcc79
+3
View File
@@ -77,6 +77,9 @@ devcaps_source_merge (const devcaps_source *s1, const devcaps_source *s2)
goto FAIL;
}
/* Merge scanintents */
src->scanintents = s1->scanintents & s2->scanintents;
/* Merge dimensions */
src->min_wid_px = math_max(s1->min_wid_px, s2->min_wid_px);
src->max_wid_px = math_min(s1->max_wid_px, s2->max_wid_px);