From 7ec50750439cb46cdb5180f6c9d071a844045b2f Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Fri, 2 Aug 2024 07:42:30 +0200 Subject: [PATCH] ppd-cache.c: Use 0.5mm for delta when comparing sizes @szlt5 found out libppd does not use the same delta as CUPS, which causes filters to use first size from the array, because the similar size according PWG (which recommends max delta 0.5mm) is not matched as useable. Related to #29, but not fixing the original issue. --- ppd/ppd-cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ppd/ppd-cache.c b/ppd/ppd-cache.c index 93cf06e1..938cdfb1 100644 --- a/ppd/ppd-cache.c +++ b/ppd/ppd-cache.c @@ -26,7 +26,7 @@ // Macro to test for two almost-equal PWG measurements. // -#define _PPD_PWG_EQUIVALENT(x, y) (abs((x)-(y)) < 2) +#define _PPD_PWG_EQUIVALENT(x, y) (abs((x)-(y)) < 50) // // Macros to work around typos in older libcups version