From 643814e7aa0373336764f3fef0f51c461d2b52fb Mon Sep 17 00:00:00 2001 From: Edward Barber Date: Mon, 11 Jul 2022 19:48:24 -0700 Subject: [PATCH] Revert "Fix vjoy activation condition handling" This reverts commit acf86c8d53c4660e2488353522508759872cf057. --- gremlin/ui/activation_condition.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gremlin/ui/activation_condition.py b/gremlin/ui/activation_condition.py index 82cada2a..8e5adfb9 100644 --- a/gremlin/ui/activation_condition.py +++ b/gremlin/ui/activation_condition.py @@ -624,6 +624,14 @@ 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):