Skip to content

Commit a43f7de

Browse files
committed
Fix trigger reporting in debugging
1 parent 6acf2f4 commit a43f7de

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

fightstick.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,9 @@ def on_key_press(self, key, modifiers):
232232
# Event to show a button when pressed.
233233
def on_button_press(self, controller, button):
234234
assert _debug_print(f"Pressed Button: {button}")
235+
if button in ("lefttrigger", "righttrigger"):
236+
return # ignore digital button events for triggers, as they are handled in on_trigger_motion
237+
235238
if button == "guide":
236239
self.manager.set_scene('config')
237240
pressed_button = self.button_mapping.get(button, None)

fightstick_hb.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,9 @@ def on_key_press(self, key, modifiers):
237237
# Event to show a button when pressed.
238238
def on_button_press(self, controller, button):
239239
assert _debug_print(f"Pressed Button: {button}")
240+
if button in ("lefttrigger", "righttrigger"):
241+
return # ignore digital button events for triggers, as they are handled in on_trigger_motion
242+
240243
if button == "guide":
241244
self.manager.set_scene('config')
242245
pressed_button = self.button_mapping.get(button, None)

0 commit comments

Comments
 (0)