genesys: Pass OPTICAL_FLAG_STAGGER flag via session

merge-requests/120/head
Povilas Kanapickas 2019-08-04 10:52:53 +03:00
rodzic a4b551be0c
commit 8618a49182
2 zmienionych plików z 1 dodań i 6 usunięć

Wyświetl plik

@ -1081,9 +1081,7 @@ static void gl843_init_optical_regs_scan(Genesys_Device* dev, const Genesys_Sens
unsigned used_pixels = endx - startx;
/* in case of stagger we have to start at an odd coordinate */
if ((flags & OPTICAL_FLAG_STAGGER)
&&((startx & 1)==0))
{
if (session.num_staggered_lines > 0 && (startx & 1) == 0) {
startx++;
endx++;
}
@ -1330,8 +1328,6 @@ static void gl843_init_scan_regs(Genesys_Device* dev, const Genesys_Sensor& sens
oflags |= OPTICAL_FLAG_DISABLE_GAMMA;
if (session.params.flags & SCAN_FLAG_DISABLE_LAMP)
oflags |= OPTICAL_FLAG_DISABLE_LAMP;
if (session.num_staggered_lines)
oflags |= OPTICAL_FLAG_STAGGER;
if (session.params.flags & SCAN_FLAG_USE_XPA)
oflags |= OPTICAL_FLAG_USE_XPA;

Wyświetl plik

@ -384,7 +384,6 @@ typedef struct {
#define OPTICAL_FLAG_DISABLE_GAMMA 0x01 /**< disable gamma correction */
#define OPTICAL_FLAG_DISABLE_SHADING 0x02 /**< disable shading correction */
#define OPTICAL_FLAG_DISABLE_LAMP 0x04 /**< turn off lamp */
#define OPTICAL_FLAG_STAGGER 0x20 /**< disable stagger correction */
#define OPTICAL_FLAG_USE_XPA 0x40 /**< use XPA lamp rather than regular one */
/*@} */