From e301ddf29f982fe2d694a602116814a5f4a5a6f9 Mon Sep 17 00:00:00 2001 From: anaximan Date: Wed, 31 May 2023 13:44:49 +0200 Subject: [PATCH] Compilation fixes when UDEV_TOUCH_SUPPORT is undefined --- input/drivers/udev_input.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/input/drivers/udev_input.c b/input/drivers/udev_input.c index 56d84efe45..0dd6b5b6c3 100644 --- a/input/drivers/udev_input.c +++ b/input/drivers/udev_input.c @@ -28,7 +28,6 @@ #endif #endif - #include #include @@ -3220,13 +3219,13 @@ static int udev_input_add_device(udev_input_t *udev, device->mouse.y_max = absinfo.maximum; } -#ifdef UDEV_TOUCH_SUPPORT if (touch) { +#ifdef UDEV_TOUCH_SUPPORT udev_init_touch_dev(device); udev_sync_touch(device); - } #endif + } if (!mouse) goto end; @@ -3338,8 +3337,13 @@ static void udev_input_handle_hotplug(udev_input_t *udev) } else if (val_touchscreen && string_is_equal(val_touchscreen, "1") && devnode) { +#ifdef UDEV_TOUCH_SUPPORT dev_type = UDEV_INPUT_TOUCHSCREEN; cb = udev_handle_touch; +#else + dev_type = UDEV_INPUT_TOUCHPAD; + cb = udev_handle_mouse; +#endif } else goto end;