Skip to content

Commit

Permalink
fix(useGamepad): explicitly ensure gamepad index is available (vueuse…
Browse files Browse the repository at this point in the history
…#3653)

Co-authored-by: AntoninRousset <antonin@i-r-s.ch>
  • Loading branch information
2 people authored and noook committed Mar 26, 2024
1 parent b77dfff commit 84cde82
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/core/useGamepad/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export function useGamepad(options: UseGamepadOptions = {}) {
hapticActuators,
axes: gamepad.axes.map(axes => axes),
buttons: gamepad.buttons.map(button => ({ pressed: button.pressed, touched: button.touched, value: button.value })),
index: gamepad.index,
} as Gamepad
}

Expand Down

0 comments on commit 84cde82

Please sign in to comment.