[selphy] Fix detection of CP-10 vs CP-XXX jobs.
parent
8440e10d1d
commit
6d064f074c
|
@ -105,8 +105,11 @@ static int parse_printjob(uint8_t *buffer, int *bw_mode, int *plane_len)
|
|||
|
||||
if (buffer[12] == 0x40 &&
|
||||
buffer[13] == 0x01) {
|
||||
*plane_len = *(uint32_t*)(&buffer[16]);
|
||||
*plane_len = le32_to_cpu(*plane_len);
|
||||
|
||||
if (buffer[2] == 0x00) {
|
||||
if (buffer[6] == 0x00)
|
||||
if (*plane_len == 688480)
|
||||
printer_type = P_CP10;
|
||||
else
|
||||
printer_type = P_CP_XXX;
|
||||
|
@ -114,9 +117,6 @@ static int parse_printjob(uint8_t *buffer, int *bw_mode, int *plane_len)
|
|||
printer_type = P_ES1;
|
||||
*bw_mode = (buffer[2] == 0x20);
|
||||
}
|
||||
|
||||
*plane_len = *(uint32_t*)(&buffer[16]);
|
||||
*plane_len = le32_to_cpu(*plane_len);
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#define VERSION "0.42"
|
||||
#define VERSION "0.43"
|
||||
|
||||
#define DEBUG( ... ) fprintf(stderr, "DEBUG: " __VA_ARGS__ )
|
||||
#define ERROR( ... ) fprintf(stderr, "ERROR: " __VA_ARGS__ )
|
||||
|
|
Loading…
Reference in New Issue