From 5e5df38cffbfb02cb328d7fca78b1149e2622a9c Mon Sep 17 00:00:00 2001 From: Ethan O'Brien <77750390+ethanaobrien@users.noreply.github.com> Date: Sat, 3 Feb 2024 09:30:39 -0600 Subject: [PATCH] Resolve #756 --- data/emulator.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/data/emulator.js b/data/emulator.js index 6ee7057..dd0ee74 100644 --- a/data/emulator.js +++ b/data/emulator.js @@ -2094,7 +2094,7 @@ class EmulatorJS { body.classList.add("ejs_control_body"); let buttons; - if (['nes', 'gb'].includes(this.getControlScheme())) { + if ("gb" === this.getControlScheme()) { buttons = [ {id: 8, label: this.localization('A')}, {id: 0, label: this.localization('B')}, @@ -2105,6 +2105,19 @@ class EmulatorJS { {id: 6, label: this.localization('LEFT')}, {id: 7, label: this.localization('RIGHT')}, ]; + } else if ("nes" === this.getControlScheme()) { + buttons = [ + {id: 8, label: this.localization('A')}, + {id: 0, label: this.localization('B')}, + {id: 2, label: this.localization('SELECT')}, + {id: 3, label: this.localization('START')}, + {id: 4, label: this.localization('UP')}, + {id: 5, label: this.localization('DOWN')}, + {id: 6, label: this.localization('LEFT')}, + {id: 7, label: this.localization('RIGHT')}, + {id: 10, label: this.localization('EJECT')},//Famicon games only + {id: 11, label: this.localization('SWAP DISKS')}, + ]; } else if ('snes' === this.getControlScheme()) { buttons = [ {id: 8, label: this.localization('A')},