tools: remove hardcoded value for boolean quirks

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 <jose.exposito89@gmail.com>
This commit is contained in:
José Expósito 2022-01-15 13:45:48 +01:00
parent cf6c97119f
commit c8d75da26d

View file

@ -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: