Skip to content

Commit

Permalink
check if uhid using sysfs entry
Browse files Browse the repository at this point in the history
  • Loading branch information
antheas committed Jul 24, 2024
1 parent 4bddc09 commit 874c904
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/hhd/controller/physical/evdev.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@ def list_evs(filter_valid: bool = False):
out["byte"][head.lower()] = bytes(reversed(arr))
case "P":
out["phys"] = line[len('P: Phys="') : -1]
case "S":
if "Sysfs" in line:
out["sysfs"] = line[len('S: Sysfs="') : -1]
case "H":
for handler in line[len("H: Handlers=") : -1].split(" "):
if "event" in handler:
Expand Down
3 changes: 1 addition & 2 deletions src/hhd/plugins/overlay/controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,7 @@ def find_devices(
continue

# Skip HHD devices
phys = dev.get("phys", "")
if "hhd" in phys or "uhid" in phys:
if "hhd" in dev.get("phys", "") or "uhid" in dev.get('sysfs', ""):
continue

# Skip Steam virtual devices
Expand Down

0 comments on commit 874c904

Please sign in to comment.