mirror of
https://github.com/openharmony/third_party_sane-airscan.git
synced 2026-06-30 21:17:55 -04:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user