From 7722813879d5b79c0b66e4c53d73c5cd1f0da901 Mon Sep 17 00:00:00 2001 From: KatieFrogs <23621460+KatieFrogs@users.noreply.github.com> Date: Wed, 15 Jun 2022 23:44:39 +0300 Subject: [PATCH] Fix D-Pad on DualSense gamepads --- public/src/js/gamepad.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/public/src/js/gamepad.js b/public/src/js/gamepad.js index 95581d7..2bcd3f2 100644 --- a/public/src/js/gamepad.js +++ b/public/src/js/gamepad.js @@ -67,13 +67,13 @@ class Gamepad{ force.lsd = force.lsd || axes[1] >= 0.5 } if(axes.length >= 10){ - // TaTaCon left D-Pad + // TaTaCon left D-Pad, DualSense D-Pad for(var pov = 0; pov < 8; pov++){ if(Math.abs(axes[9] - (pov / 3.5 - 1)) <= 0.01){ - force.lsu = force.lsu || pov === 7 || pov === 0 || pov === 1 - force.lsr = force.lsr || pov === 1 || pov === 2 || pov === 3 - force.lsd = force.lsd || pov === 3 || pov === 4 || pov === 5 - force.lsl = force.lsl || pov === 5 || pov === 6 || pov === 7 + force.u = force.u || pov === 7 || pov === 0 || pov === 1 + force.r = force.r || pov === 1 || pov === 2 || pov === 3 + force.d = force.d || pov === 3 || pov === 4 || pov === 5 + force.l = force.l || pov === 5 || pov === 6 || pov === 7 break } }