Skip to content

Commit

Permalink
fix evdev import (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
QuanyiLi committed Sep 5, 2021
1 parent 3fe7dc1 commit 0a9ea8d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions metadrive/engine/core/manual_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
from metadrive.utils import is_win, is_mac

if (not is_win()) and (not is_mac()):
import evdev
from evdev import ecodes, InputDevice
try:
import evdev
from evdev import ecodes, InputDevice
except ImportError:
print("Install evdev to enable steering wheel control")

from metadrive.utils import import_pygame

Expand Down

0 comments on commit 0a9ea8d

Please sign in to comment.