mirror of
https://github.com/EmulatorJS/EmulatorJS.git
synced 2024-09-20 02:46:23 +00:00
Fix the ability to set other player's gamepad value
This commit is contained in:
parent
91d1d279e4
commit
aa6fd8be02
2 changed files with 3 additions and 2 deletions
|
@ -2450,7 +2450,8 @@ class EmulatorJS {
|
|||
if (this.controlPopup.parentElement.parentElement.getAttribute("hidden") === null) {
|
||||
if ('buttonup' === e.type || (e.type === "axischanged" && value === 0)) return;
|
||||
const num = this.controlPopup.getAttribute("button-num");
|
||||
const player = this.controlPopup.getAttribute("player-num");
|
||||
const player = parseInt(this.controlPopup.getAttribute("player-num"));
|
||||
if (e.gamepadIndex !== player) return;
|
||||
if (!this.controls[player][num]) {
|
||||
this.controls[player][num] = {};
|
||||
}
|
||||
|
|
2
data/emulator.min.js
vendored
2
data/emulator.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue