wacom: Pick libwacom's Generic Pen stylus if tool ID is 0

We generally use tool ID 0 if the ID is actually unknown, libwacom however
assigns 0xfffff to such device. Make it sure we find the "Generic Pen"
stylus description in that case.
This commit is contained in:
Carlos Garnacho 2020-02-13 20:28:29 +01:00 committed by Robert Ancell
parent 4e982fa9c1
commit 7c85d5a871

View file

@ -165,6 +165,9 @@ cc_wacom_tool_initable_init (GInitable *initable,
tool->id = ids[0];
}
if (tool->id == 0)
tool->wstylus = libwacom_stylus_get_for_id (wacom_db, 0xfffff);
else
tool->wstylus = libwacom_stylus_get_for_id (wacom_db, tool->id);
if (!tool->wstylus) {