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 Jan 31, 2024
1 parent f391df0 commit 8a86e7f
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 @@ -313,6 +313,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 8a86e7f

Please sign in to comment.