mirror of
https://github.com/mupen64plus/mupen64plus-ui-python.git
synced 2025-04-02 10:51:53 -04:00
Merge pull request #121 from jimbo1qaz/patch-1
Add hard-coded deadzone into input configuration buttons.
This commit is contained in:
commit
164577efde
1 changed files with 4 additions and 2 deletions
|
@ -100,8 +100,10 @@ class InputButton(QPushButton):
|
||||||
self.clearFocus()
|
self.clearFocus()
|
||||||
|
|
||||||
def on_axis_value_changed(self, axis, value):
|
def on_axis_value_changed(self, axis, value):
|
||||||
val = "-" if value < 0 else "+"
|
# SDL axes range from -32768 to 32767. Only map axes which are half-pressed or more.
|
||||||
self.on_joystick_event("axis", axis, val)
|
if abs(value) >= 16384:
|
||||||
|
val = "-" if value < 0 else "+"
|
||||||
|
self.on_joystick_event("axis", axis, val)
|
||||||
|
|
||||||
def on_button_value_changed(self, button, value):
|
def on_button_value_changed(self, button, value):
|
||||||
if value:
|
if value:
|
||||||
|
|
Loading…
Add table
Reference in a new issue