summaryrefslogtreecommitdiffstats
path: root/backend_mitsu9550.c
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2019-10-18 14:17:51 -0400
committerSolomon Peachy <pizza@shaftnet.org>2019-10-18 14:17:51 -0400
commitb05cf5f65582a665ee83b71d0788b65bf14a51c5 (patch)
tree7411a2e3af4603c6790194ccad57bc0f9ffe16ec /backend_mitsu9550.c
parente965f175988683a12678812e20d26273c240dcc9 (diff)
downloadselphy_print-b05cf5f65582a665ee83b71d0788b65bf14a51c5.tar.gz
selphy_print-b05cf5f65582a665ee83b71d0788b65bf14a51c5.tar.bz2
selphy_print-b05cf5f65582a665ee83b71d0788b65bf14a51c5.zip
misc: When there is more than once copy count source, use the largest.
Diffstat (limited to 'backend_mitsu9550.c')
-rw-r--r--backend_mitsu9550.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/backend_mitsu9550.c b/backend_mitsu9550.c
index 7f652d1..97b6926 100644
--- a/backend_mitsu9550.c
+++ b/backend_mitsu9550.c
@@ -852,7 +852,8 @@ hdr_done:
/* Update printjob header to reflect number of requested copies */
if (job->hdr2_present) {
copies = 1;
- job->hdr2.copies = cpu_to_be16(copies);
+ if (be16_to_cpu(job->hdr2.copies) < copies)
+ job->hdr2.copies = cpu_to_be16(copies);
}
job->copies = copies;
@@ -1133,7 +1134,7 @@ static int mitsu9550_main_loop(void *vctx, const void *vjob) {
int ret;
#if 0
- int copies;
+ int copies = 1;
#endif
// const struct mitsu9550_printjob *job = vjob;
@@ -1149,7 +1150,7 @@ static int mitsu9550_main_loop(void *vctx, const void *vjob) {
#if 0
/* If hdr2 is not present, we have to generate copies ourselves! */
- if (job->hdr2_present)
+ if (!job->hdr2_present)
copies = job->copies;
// XXX..
#endif
@@ -1704,7 +1705,7 @@ static const char *mitsu9550_prefixes[] = {
/* Exported */
struct dyesub_backend mitsu9550_backend = {
.name = "Mitsubishi CP9xxx family",
- .version = "0.48",
+ .version = "0.49",
.uri_prefixes = mitsu9550_prefixes,
.cmdline_usage = mitsu9550_cmdline,
.cmdline_arg = mitsu9550_cmdline_arg,