mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-20 05:40:04 +01:00
quirks: correctly print boolean values
When a boolean quirk is set to "0", it is correctly disabled, but "libinput quirks list" and
"libinput record" showed it as "1".
This happens for example if ModelXXXX=0 is set in /etc/libinput/local-overrides.quirks, to
override a default quirk.
Signed-off-by: Loïc Yhuel <loic.yhuel@softathome.com>
(cherry picked from commit dd0370f73c)
This commit is contained in:
parent
86d81a0ac7
commit
f9f9bc5927
1 changed files with 3 additions and 1 deletions
|
|
@ -620,9 +620,11 @@ tools_list_device_quirks(struct quirks_context *ctx,
|
|||
do {
|
||||
if (quirks_has_quirk(quirks, q)) {
|
||||
const char *name;
|
||||
bool b;
|
||||
|
||||
name = quirk_get_name(q);
|
||||
snprintf(buf, sizeof(buf), "%s=1", name);
|
||||
quirks_get_bool(quirks, q, &b);
|
||||
snprintf(buf, sizeof(buf), "%s=%d", name, b ? 1 : 0);
|
||||
callback(userdata, buf);
|
||||
}
|
||||
} while(++q < _QUIRK_LAST_MODEL_QUIRK_);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue