Skip to content

Commit

Permalink
Provide fallback value for FF_MAX_EFFECTS (#219)
Browse files Browse the repository at this point in the history
This is required to make python-evdev work on CentOS 7.
  • Loading branch information
KarsMulder committed Apr 28, 2024
1 parent cb41241 commit 87c99f7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion evdev/uinput.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@ def __init__(
devnode="/dev/uinput",
phys="py-evdev-uinput",
input_props=None,
max_effects=ecodes.FF_MAX_EFFECTS,
# CentOS 7 has sufficiently old headers that FF_MAX_EFFECTS is not defined there,
# which causes the whole module to fail loading. Fallback on a hardcoded value of
# FF_MAX_EFFECTS if it is not defined in the ecodes.
max_effects=ecodes.ecodes.get("FF_MAX_EFFECTS", 96),
):
"""
Arguments
Expand Down

0 comments on commit 87c99f7

Please sign in to comment.