From 2b1a21b2405cb1b28f81e2d06052d6ae0811fdd7 Mon Sep 17 00:00:00 2001 From: Rafael Araujo Lehmkuhl Date: Wed, 31 Jan 2024 15:58:08 -0300 Subject: [PATCH] joystick-config-page: Force joystick forwarding to stay disabled while in the config page --- src/views/ConfigurationJoystickView.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/views/ConfigurationJoystickView.vue b/src/views/ConfigurationJoystickView.vue index 997942861..764666519 100644 --- a/src/views/ConfigurationJoystickView.vue +++ b/src/views/ConfigurationJoystickView.vue @@ -337,6 +337,13 @@ onUnmounted(() => { controllerStore.enableForwarding = true }) +// Does not let the joystick forwarding to be enabled while the user is in this page +// This could happen, for example, when the joystick is reconnected while in this page +watch( + () => controllerStore.enableForwarding, + () => (controllerStore.enableForwarding = false) +) + const currentJoystick = ref() const currentButtonInputs = ref([]) const currentAxisInputs = ref([])