From ccfab6e26fcc37d02c727227acb4047ae6842fee Mon Sep 17 00:00:00 2001 From: hiqqup Date: Wed, 13 Dec 2023 14:55:42 +0100 Subject: [PATCH] update to only support one scroll direction, sym void pointer --- dwl.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/dwl.c b/dwl.c index bfeb3f9..d358414 100644 --- a/dwl.c +++ b/dwl.c @@ -988,13 +988,9 @@ createnotify(struct wl_listener *listener, void *data) double libinput_event_pointer_get_scroll_value(struct libinput_event_pointer* event, enum libinput_pointer_axis axis) { - void* sym = dlsym(RTLD_NEXT, "libinput_event_pointer_get_scroll_value"); + void *sym = dlsym(RTLD_NEXT, "libinput_event_pointer_get_scroll_value"); hooked_axis_t hooked = *(hooked_axis_t*)(&sym); - if (axis == LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL) { - return hooked(event, axis) * scroll_factor; - } else { - return hooked(event, axis) * scroll_factor; - } + return hooked(event, axis) * scroll_factor; } void