diff --git a/src/configs/pad_unlicensedSNES.ts b/src/configs/pad_unlicensedSNES.ts index 8321c364e..7da7553ff 100644 --- a/src/configs/pad_unlicensedSNES.ts +++ b/src/configs/pad_unlicensedSNES.ts @@ -6,7 +6,7 @@ import {Button} from "../enums/buttons"; */ const pad_unlicensedSNES = { padID: '081f-e401', - padType: 'xbox', + padType: 'snes', gamepadMapping : { RC_S: 2, RC_E: 1, diff --git a/src/inputs-controller.ts b/src/inputs-controller.ts index 23e508507..3e43d60ec 100644 --- a/src/inputs-controller.ts +++ b/src/inputs-controller.ts @@ -501,7 +501,6 @@ export class InputsController { return pad_dualshock; } - return pad_unlicensedSNES; return pad_generic; } @@ -663,7 +662,8 @@ export class InputsController { * @returns Array Tuple containing the pad type and the currently assigned icon for the button index. */ getPressedButtonLabel(button: Phaser.Input.Gamepad.Button): [string, string] { - return [this.configs[this.chosenGamepad].padType, getCurrenlyAssignedIconFromInputIndex(this.configs[this.chosenGamepad], button.index)]; + const type = this.configs[this.chosenGamepad].padType; + return [type === 'snes' ? 'xbox' : type, getCurrenlyAssignedIconFromInputIndex(this.configs[this.chosenGamepad], button.index)]; } /** diff --git a/src/ui/settings-gamepad-ui-handler.ts b/src/ui/settings-gamepad-ui-handler.ts index c21bb60e7..d0df227b3 100644 --- a/src/ui/settings-gamepad-ui-handler.ts +++ b/src/ui/settings-gamepad-ui-handler.ts @@ -144,7 +144,7 @@ export default class SettingsGamepadUiHandler extends UiHandler { } // For null options, add an icon for the key. const key = getKeyForSettingName(config as GamepadConfig, SettingGamepad[setting]); - const icon = this.scene.add.sprite(0, 0, config.padType); + const icon = this.scene.add.sprite(0, 0, config.padType === 'snes' ? 'xbox' : config.padType); icon.setScale(0.1); icon.setOrigin(0, -0.1); inputsIcons[key] = icon; @@ -429,7 +429,7 @@ export default class SettingsGamepadUiHandler extends UiHandler { const lastCursor = this.optionCursors[settingIndex]; // Check if the setting is not part of the bindings (i.e., it's a regular setting). - if (!this.bindingSettings.includes(setting)) { + if (!this.bindingSettings.includes(setting) && !setting.includes('BUTTON_')) { // Get the label of the last selected option and revert its color to the default. const lastValueLabel = this.optionValueLabels[settingIndex][lastCursor]; lastValueLabel.setColor(this.getTextColor(TextStyle.WINDOW));