Skip to content

Commit

Permalink
Provide fallback value for FF_MAX_EFFECTS
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 27, 2024
1 parent 5fb3190 commit e455d4a
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 e455d4a

Please sign in to comment.