diff options
author | Enrico Weigelt, metux IT consult <info@metux.net> | 2024-02-20 16:51:51 +0100 |
---|---|---|
committer | Enrico Weigelt, metux IT consult <info@metux.net> | 2024-02-21 13:19:47 +0100 |
commit | c6b4d2732f1b6bdf2235fe0796805f28776c0819 (patch) | |
tree | f57e2c5275cf6ed88bd654464a8f5062cf349c19 /src | |
parent | 6ed6814489b47acc3e78e4f165506c7164a82670 (diff) |
replace BUG_() macros by xf86IDrvMsg() calls
Latest master moved the BUG_() macros out of os.h, and it's more appropriate
to use xf86IDrvMsg() in those cases (like we're already doing in other places)
anyways.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/xf86libinput.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/xf86libinput.c b/src/xf86libinput.c index 5f46ad6..91af896 100644 --- a/src/xf86libinput.c +++ b/src/xf86libinput.c @@ -1320,7 +1320,10 @@ xf86libinput_init_tablet(InputInfoPtr pInfo) int nbuttons = TABLET_NUM_BUTTONS; int naxes = 2; - BUG_RETURN(driver_data->tablet_tool == NULL); + if (driver_data->tablet_tool == NULL) { + xf86IDrvMsg(pInfo, X_WARNING, "BUG: tablet_tool is NULL\n"); + return; + } tool = driver_data->tablet_tool; @@ -1438,7 +1441,10 @@ xf86libinput_init(DeviceIntPtr dev) struct xf86libinput_device *shared_device = driver_data->shared_device; struct libinput_device *device = shared_device->device; - BUG_RETURN_VAL(device == NULL, !Success); + if (device == NULL) { + xf86IDrvMsg(pInfo, X_WARNING, "BUG: xf86libinput_init() device is NULL\n"); + return !Success; + } dev->public.on = FALSE; @@ -2410,7 +2416,10 @@ xf86libinput_handle_tablet_proximity(InputInfoPtr pInfo, if (xf86libinput_tool_queue_event(event)) return EVENT_QUEUED; - BUG_RETURN_VAL(pDev == NULL, EVENT_HANDLED); + if (pDev == NULL) { + xf86IDrvMsg(pInfo, X_WARNING, "BUG: xf86libinput_handle_tablet_proximity() pDev is NULL\n"); + return EVENT_HANDLED; + } x = libinput_event_tablet_tool_get_x_transformed(event, TABLET_AXIS_MAX); y = libinput_event_tablet_tool_get_y_transformed(event, TABLET_AXIS_MAX); @@ -4212,7 +4221,8 @@ xf86libinput_check_device(DeviceIntPtr dev, struct libinput_device *device = driver_data->shared_device->device; if (device == NULL) { - BUG_WARN(dev->public.on); + if (dev->public.on) + xf86IDrvMsg(pInfo, X_WARNING, "BUG: xf86libinput_check_device() device is on\n"); xf86IDrvMsg(pInfo, X_INFO, "SetProperty on %u called but device is disabled.\n" "This driver cannot change properties on a disabled device\n", |