fixed gamepad template color index determination from name
This commit is contained in:
parent
11ba1e8fb0
commit
6e92dddd95
@ -384,8 +384,8 @@ class Gamepad {
|
|||||||
// the color is a string, load it by its name
|
// the color is a string, load it by its name
|
||||||
this.activeGamepadColorName = gamepadColor;
|
this.activeGamepadColorName = gamepadColor;
|
||||||
this.activeGamepadColorIndex = 0;
|
this.activeGamepadColorIndex = 0;
|
||||||
for (let gamepadColorName in this.activeGamepadIdentifier.colors) {
|
for (let gamepadColorIndex in this.activeGamepadIdentifier.colors) {
|
||||||
if (this.activeGamepadColorName === gamepadColorName) {
|
if (this.activeGamepadColorName === this.activeGamepadIdentifier.colors[gamepadColorIndex]) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
this.activeGamepadColorIndex++;
|
this.activeGamepadColorIndex++;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user