From 87f5637a47f52499a2d87b12b5903db8b401c20d Mon Sep 17 00:00:00 2001 From: Povilas Kanapickas Date: Mon, 13 Apr 2020 07:23:42 +0300 Subject: [PATCH] genesys: Cleanup pixel position handling on gl124 --- backend/genesys/low.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/backend/genesys/low.cpp b/backend/genesys/low.cpp index 3e380729a..a68a7ee47 100644 --- a/backend/genesys/low.cpp +++ b/backend/genesys/low.cpp @@ -838,18 +838,11 @@ void compute_session_pixel_offsets(const Genesys_Device* dev, ScanSession& s, } else if (dev->model->asic_type == AsicType::GL843 || dev->model->asic_type == AsicType::GL845 || dev->model->asic_type == AsicType::GL846 || - dev->model->asic_type == AsicType::GL847) + dev->model->asic_type == AsicType::GL847 || + dev->model->asic_type == AsicType::GL124) { s.pixel_startx = s.output_startx * sensor.optical_res / s.params.xres; s.pixel_endx = s.pixel_startx + s.optical_pixels_raw; - - } else if (dev->model->asic_type == AsicType::GL124) { - unsigned startx = s.params.startx * sensor.optical_res / s.params.xres; - - s.pixel_startx = startx; - - // FIXME: should we add sensor.dummy_pxel to pixel_startx at this point? - s.pixel_endx = s.pixel_startx + s.optical_pixels; } s.pixel_startx = sensor.pixel_count_ratio.apply(s.pixel_startx);