From c8d75da26d843bdfd11f167457618618bcf5e863 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= Date: Sat, 15 Jan 2022 13:45:48 +0100 Subject: tools: remove hardcoded value for boolean quirks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a boolean quirk was displayed its real value was ignored and instead a hardcoded value of 1 was always used. Get the quirk real value and display it. Fix #725 Signed-off-by: José Expósito --- tools/shared.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/shared.c b/tools/shared.c index 096fcbed..49760e3c 100644 --- a/tools/shared.c +++ b/tools/shared.c @@ -693,6 +693,7 @@ tools_list_device_quirks(struct quirks_context *ctx, uint32_t v; char *s; double d; + bool b; name = quirk_get_name(q); @@ -733,7 +734,8 @@ tools_list_device_quirks(struct quirks_context *ctx, break; case QUIRK_ATTR_USE_VELOCITY_AVERAGING: case QUIRK_ATTR_TABLET_SMOOTHING: - snprintf(buf, sizeof(buf), "%s=1", name); + quirks_get_bool(quirks, q, &b); + snprintf(buf, sizeof(buf), "%s=%d", name, b); callback(userdata, buf); break; case QUIRK_ATTR_EVENT_CODE_DISABLE: -- cgit v1.2.1