diff --git a/backend/genesys_gl124.cc b/backend/genesys_gl124.cc index 43d5f7c9e..ce96c2ed4 100644 --- a/backend/genesys_gl124.cc +++ b/backend/genesys_gl124.cc @@ -1062,7 +1062,6 @@ static void gl124_init_scan_regs(Genesys_Device* dev, const Genesys_Sensor& sens DBG_HELPER(dbg); session.assert_computed(); - int used_res; int start, used_pixels; int bytes_per_line; int move; @@ -1089,20 +1088,7 @@ static void gl124_init_scan_regs(Genesys_Device* dev, const Genesys_Sensor& sens } DBG (DBG_info, "gl124_init_scan_regs : stagger=%d lines\n", stagger); - /** @brief compute used resolution */ - if (session.params.flags & SCAN_FLAG_USE_OPTICAL_RES) { - used_res = session.optical_resolution; - } - else - { - // resolution is choosen from a fixed list and can be used directly, unless we have ydpi - // higher than sensor's maximum one */ - if (session.params.xres > session.optical_resolution) { - used_res = session.optical_resolution; - } else { - used_res = session.params.xres; - } - } + unsigned used_res = session.params.xres; /* compute scan parameters values */ /* pixels are allways given at full optical resolution */ diff --git a/backend/genesys_gl846.cc b/backend/genesys_gl846.cc index 7a148d6cd..03784d717 100644 --- a/backend/genesys_gl846.cc +++ b/backend/genesys_gl846.cc @@ -947,7 +947,6 @@ static void gl846_init_scan_regs(Genesys_Device* dev, const Genesys_Sensor& sens DBG_HELPER(dbg); session.assert_computed(); - int used_res; int start, used_pixels; int bytes_per_line; int move; @@ -972,14 +971,7 @@ static void gl846_init_scan_regs(Genesys_Device* dev, const Genesys_Sensor& sens } DBG(DBG_info, "%s : stagger=%d lines\n", __func__, stagger); - if (session.params.flags & SCAN_FLAG_USE_OPTICAL_RES) { - used_res = session.optical_resolution; - } - else - { - /* resolution is choosen from a list */ - used_res = session.params.xres; - } + unsigned used_res = session.params.xres; /* compute scan parameters values */ /* pixels are allways given at full optical resolution */ diff --git a/backend/genesys_gl847.cc b/backend/genesys_gl847.cc index 9eeb89d1f..d423622a4 100644 --- a/backend/genesys_gl847.cc +++ b/backend/genesys_gl847.cc @@ -966,7 +966,6 @@ static void gl847_init_scan_regs(Genesys_Device* dev, const Genesys_Sensor& sens DBG_HELPER(dbg); session.assert_computed(); - int used_res; int start, used_pixels; int bytes_per_line; int move; @@ -991,13 +990,7 @@ static void gl847_init_scan_regs(Genesys_Device* dev, const Genesys_Sensor& sens } DBG(DBG_info, "%s : stagger=%d lines\n", __func__, stagger); - /* used_res */ - if (session.params.flags & SCAN_FLAG_USE_OPTICAL_RES) { - used_res = session.optical_resolution; - } else { - /* resolution is choosen from a list */ - used_res = session.params.xres; - } + unsigned used_res = session.params.xres; /* compute scan parameters values */ /* pixels are allways given at full optical resolution */