diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2024-04-12 10:43:45 +1000 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2024-04-23 01:31:48 +0000 |
commit | c5b732cc3821439c44372ef1caff7ed2047662ef (patch) | |
tree | aaba7101ff4add5cbd22b255eac0f35cfac1c419 | |
parent | a8acd4a6929ce9d2a97b97c0378ac4b878be457b (diff) |
pad: rename two helper functions
This is the specific behavior of the Wacom strips and rings, so let's
add wacom to the name.
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/989>
-rw-r--r-- | src/evdev-tablet-pad.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/evdev-tablet-pad.c b/src/evdev-tablet-pad.c index 59f63cb5..2a94f007 100644 --- a/src/evdev-tablet-pad.c +++ b/src/evdev-tablet-pad.c @@ -190,7 +190,7 @@ pad_process_absolute(struct pad_dispatch *pad, } static inline double -normalize_ring(const struct input_absinfo *absinfo) +normalize_wacom_ring(const struct input_absinfo *absinfo) { /* libinput has 0 as the ring's northernmost point in the device's current logical rotation, increasing clockwise to 1. Wacom has @@ -206,7 +206,7 @@ normalize_ring(const struct input_absinfo *absinfo) } static inline double -normalize_strip(const struct input_absinfo *absinfo) +normalize_wacom_strip(const struct input_absinfo *absinfo) { /* strip axes don't use a proper value, they just shift the bit left * for each position. 0 isn't a real value either, it's only sent on @@ -230,7 +230,7 @@ pad_handle_ring(struct pad_dispatch *pad, absinfo = libevdev_get_abs_info(device->evdev, code); assert(absinfo); - degrees = normalize_ring(absinfo) * 360; + degrees = normalize_wacom_ring(absinfo) * 360; if (device->left_handed.enabled) degrees = fmod(degrees + 180, 360); @@ -252,7 +252,7 @@ pad_handle_strip(struct pad_dispatch *pad, if (absinfo->value == 0) return 0.0; - pos = normalize_strip(absinfo); + pos = normalize_wacom_strip(absinfo); if (device->left_handed.enabled) pos = 1.0 - pos; |