Skip to content

Commit

Permalink
Fix vjoy activation condition handling
Browse files Browse the repository at this point in the history
    Previously all vjoy activation conditions would be reset to the
    default value when the UI was refreshed. This was due to several
    lines in `VJoyConditionWidget._modify_vjoy` which were intended
    to reset to a default value if the VJoy input was modified.
    Unfortunately, `_modify_vjoy` is called every time the UI is reset,
    thus resetting the condition trigger in addition to the intended
    effect of updating the selected VJoy input.

    To avoid the reset, we simply removed the lines that change the
    activation condition within `_modify_vjoy`.
  • Loading branch information
edwardwbarber committed Jul 10, 2022
1 parent d740f59 commit acf86c8
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions gremlin/ui/activation_condition.py
Original file line number Diff line number Diff line change
Expand Up @@ -624,14 +624,6 @@ def _modify_vjoy(self, data):
self.condition_data.vjoy_id = data["device_id"]
self.condition_data.input_type = data["input_type"]
self.condition_data.input_id = data["input_id"]

if data["input_type"] == InputType.JoystickAxis:
self.condition_data.comparison = "inside"
elif data["input_type"] == InputType.JoystickButton:
self.condition_data.comparison = "pressed"
elif data["input_type"] == InputType.JoystickHat:
self.condition_data.comparison = \
util.hat_tuple_to_direction((0, 0))
self._create_ui()

def _range_lower_changed_cb(self, value):
Expand Down

0 comments on commit acf86c8

Please sign in to comment.