Skip to content

Commit

Permalink
fix: fix gamepad mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
arianrhodsandlot committed Mar 10, 2024
1 parent 6f8c111 commit 1bd86cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/helpers/retroarch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ export function getRetroarchConfig() {
const inputConfig = getEmptyInputConfig()
if (compact(gamepads).length > 0) {
for (const [index, gamepad] of gamepads.entries()) {
const mapping = gamepadMappingsMap.get(gamepad?.id ?? '')
if (mapping && gamepad) {
if (gamepad) {
const mapping = gamepadMappingsMap.get(gamepad.id) || gamepadMappingsMap.get('')
for (const codeKey in mapping) {
let buttonName = mapping[codeKey]
// eslint-disable-next-line max-depth
Expand Down

0 comments on commit 1bd86cb

Please sign in to comment.