mirror of
https://github.com/nvms/prsm.git
synced 2025-12-16 08:00:53 +00:00
skip pad
This commit is contained in:
parent
3ca5470ef9
commit
bafe78e6b2
@ -37,6 +37,8 @@ const squash = (number) => (Math.abs(number) >= deadzone ? number : Math.abs(num
|
|||||||
|
|
||||||
export const gamepadUpdate = () => {
|
export const gamepadUpdate = () => {
|
||||||
for (const pad of navigator.getGamepads()) {
|
for (const pad of navigator.getGamepads()) {
|
||||||
|
if (!pad) continue;
|
||||||
|
|
||||||
gamepadState[pad.index] = {
|
gamepadState[pad.index] = {
|
||||||
axes: {
|
axes: {
|
||||||
0: squash(pad.axes[0]),
|
0: squash(pad.axes[0]),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user