Skip to content

Commit

Permalink
fix dual controller gyro controller outputting buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
antheas committed Jul 26, 2024
1 parent e075fea commit 6e09a14
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "hhd"
version = "3.3.2"
version = "3.3.3"
authors = [
{ name="Kapenekakis Antheas", email="pypi@antheas.dev" },
]
Expand Down
5 changes: 5 additions & 0 deletions src/hhd/controller/virtual/dualsense/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,9 @@ def consume(self, events: Sequence[Event]):
ev["value"] / DS5_EDGE_DELTA_TIME_NS
).to_bytes(8, byteorder="little", signed=False)[:4]
case "button":
if self.left_motion:
# skip buttons for left motion
continue
if not self.enable_touchpad and code.startswith("touchpad"):
continue
if (self.paddles_to_clicks == "top" and code == "extra_l1") or (
Expand Down Expand Up @@ -490,6 +493,8 @@ def consume(self, events: Sequence[Event]):
)

case "configuration":
if self.left_motion:
continue
match code:
case "touchpad_aspect_ratio":
self.aspect_ratio = cast(float, ev["value"])
Expand Down

0 comments on commit 6e09a14

Please sign in to comment.