Skip to content

Commit 31b665a

Browse files
authored
Merge pull request #68 from NSTCG/fix-ip
Filter out non functional buttons for input profiile
2 parents 5ad3dfd + 25ca967 commit 31b665a

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

input-profile.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ export class InputProfile extends Component {
270270

271271
for (const i in components) {
272272
const visualResponses = components[i].visualResponses;
273+
if (components[i].rootNodeName === 'menu') continue;
273274

274275
for (const j in visualResponses) {
275276
// update buttons with new interface of current visual response
@@ -282,14 +283,14 @@ export class InputProfile extends Component {
282283
this._gamepadObjects[minNode] = obj.findByNameRecursive(minNode)[0];
283284
this._gamepadObjects[maxNode] = obj.findByNameRecursive(maxNode)[0];
284285

285-
const indice = visualResponses[j].componentProperty;
286+
const prop = visualResponses[j].componentProperty;
286287
const response: VisualResponse = {
287288
target: this._gamepadObjects[valueNode],
288289
min: this._gamepadObjects[minNode],
289290
max: this._gamepadObjects[maxNode],
290-
id: components[i].gamepadIndices[indice], // Assign a unique ID
291+
id: components[i].gamepadIndices[prop], // Assign a unique ID
291292
};
292-
switch (indice) {
293+
switch (prop) {
293294
case 'button':
294295
this._buttons.push(response);
295296
break;

0 commit comments

Comments
 (0)