Skip to content

Commit

Permalink
joystick-config-page: Force joystick forwarding to stay disabled whil…
Browse files Browse the repository at this point in the history
…e in the config page
  • Loading branch information
rafaellehmkuhl committed Feb 1, 2024
1 parent b48776c commit 2b1a21b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/views/ConfigurationJoystickView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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<Joystick>()
const currentButtonInputs = ref<JoystickButtonInput[]>([])
const currentAxisInputs = ref<JoystickAxisInput[]>([])
Expand Down

0 comments on commit 2b1a21b

Please sign in to comment.