kopia lustrzana https://gitlab.com/sane-project/backends
Changes the status when the trays are empty.
rodzic
ba5f992737
commit
3d02d2f1be
|
@ -741,6 +741,8 @@ sane_cancel(SANE_Handle h)
|
|||
handler->scanner->work = SANE_FALSE;
|
||||
handler->cancel = SANE_TRUE;
|
||||
escl_scanner(handler->device, handler->result);
|
||||
free(handler->result);
|
||||
handler->result = NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -982,8 +984,9 @@ sane_start(SANE_Handle h)
|
|||
handler->ps.pixels_per_line = w;
|
||||
handler->ps.lines = he;
|
||||
handler->ps.bytes_per_line = w * bps;
|
||||
handler->scanner->work = SANE_FALSE;
|
||||
handler->ps.last_frame = SANE_TRUE;
|
||||
handler->ps.format = SANE_FRAME_RGB;
|
||||
handler->scanner->work = SANE_FALSE;
|
||||
// DBG(10, "NEXT Frame [%s]\n", (handler->ps.last_frame ? "Non" : "Oui"));
|
||||
DBG(10, "Real Size Image [%dx%d|%dx%d]\n", 0, 0, w, he);
|
||||
return (status);
|
||||
|
@ -1065,14 +1068,11 @@ sane_read(SANE_Handle h, SANE_Byte *buf, SANE_Int maxlen, SANE_Int *len)
|
|||
}
|
||||
}
|
||||
else {
|
||||
SANE_Status status = SANE_STATUS_EOF;
|
||||
*len = 0;
|
||||
free(handler->scanner->img_data);
|
||||
handler->scanner->img_data = NULL;
|
||||
if (handler->scanner->source == PLATEN) {
|
||||
handler->scanner->work = SANE_FALSE;
|
||||
handler->ps.last_frame = SANE_TRUE;
|
||||
}
|
||||
else {
|
||||
if (handler->scanner->source != PLATEN) {
|
||||
SANE_Status st = escl_status(handler->device,
|
||||
handler->scanner->source,
|
||||
handler->result);
|
||||
|
@ -1083,8 +1083,14 @@ sane_read(SANE_Handle h, SANE_Byte *buf, SANE_Int maxlen, SANE_Int *len)
|
|||
SANE_FALSE);
|
||||
handler->scanner->work = next_page;
|
||||
handler->ps.last_frame = !next_page;
|
||||
if (handler->ps.last_frame = SANE_TRUE)
|
||||
status = SANE_STATUS_EOF;
|
||||
else
|
||||
status = SANE_STATUS_NO_DOCS;
|
||||
}
|
||||
return (SANE_STATUS_EOF);
|
||||
else
|
||||
status = SANE_STATUS_EOF;
|
||||
return status;
|
||||
}
|
||||
return (SANE_STATUS_GOOD);
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue