touchpad: don't check libwacom if we're not tagged as tablet touchpad

No need to go through the effort if we're not tagged as a tablet+touchpad
device anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2019-05-03 13:52:09 +10:00
parent 902f1014c8
commit 9802ada606

View file

@ -3734,13 +3734,16 @@ tp_init_left_handed_rotation(struct tp_dispatch *tp,
{
bool rotate = false;
#if HAVE_LIBWACOM
WacomDeviceDatabase *db;
WacomDeviceDatabase *db = NULL;
WacomDevice **devices = NULL,
**d;
WacomDevice *dev;
uint32_t vid = evdev_device_get_id_vendor(device),
pid = evdev_device_get_id_product(device);
if ((device->tags & EVDEV_TAG_TABLET_TOUCHPAD) == 0)
goto out;
db = libwacom_database_new();
if (!db) {
evdev_log_info(device,