From f1c34dd0d4e3bf89851f74a765ba4aca60fdfcc4 Mon Sep 17 00:00:00 2001 From: Frost Date: Wed, 6 Aug 2025 23:25:28 -0700 Subject: [PATCH] Send chain magic after precut This lets you do chain mode with a precut first. --- src/ptouch-print.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/ptouch-print.c b/src/ptouch-print.c index cd58de6..de54f1f 100644 --- a/src/ptouch-print.c +++ b/src/ptouch-print.c @@ -110,12 +110,6 @@ int print_img(ptouch_dev ptdev, gdImage *im, int chain) } } if ((ptdev->devinfo->flags & FLAG_D460BT_MAGIC) == FLAG_D460BT_MAGIC) { - if (chain) { - ptouch_send_d460bt_chain(ptdev); - if (debug) { - printf(_("send PT-D460BT chain commands\n")); - } - } ptouch_send_d460bt_magic(ptdev); if (debug) { printf(_("send PT-D460BT magic commands\n")); @@ -127,6 +121,15 @@ int print_img(ptouch_dev ptdev, gdImage *im, int chain) printf(_("send precut command\n")); } } + /* send chain command after precut, to allow precutting before chain */ + if ((ptdev->devinfo->flags & FLAG_D460BT_MAGIC) == FLAG_D460BT_MAGIC) { + if (chain) { + ptouch_send_d460bt_chain(ptdev); + if (debug) { + printf(_("send PT-D460BT chain commands\n")); + } + } + } for (int k = 0; k < gdImageSX(im); ++k) { memset(rasterline, 0, sizeof(rasterline)); for (int i = 0; i < gdImageSY(im); ++i) {