mirror of
https://github.com/EmulatorJS/EmulatorJS.git
synced 2024-09-20 02:46:23 +00:00
Core-specific config
This commit is contained in:
parent
71c33ff3ee
commit
ae18b361c2
1 changed files with 114 additions and 28 deletions
|
@ -1383,7 +1383,84 @@ class EmulatorJS {
|
|||
this.controlMenu = body.parentElement;
|
||||
body.classList.add("ejs_control_body");
|
||||
|
||||
const buttons = {
|
||||
let buttons;
|
||||
if ('nes' === this.getCore(true)) {
|
||||
buttons = {
|
||||
8: 'A',
|
||||
0: 'B',
|
||||
2: 'SELECT',
|
||||
3: 'START',
|
||||
4: 'UP',
|
||||
5: 'DOWN',
|
||||
6: 'LEFT',
|
||||
7: 'RIGHT',
|
||||
24: this.localization('QUICK SAVE STATE'),
|
||||
25: this.localization('QUICK LOAD STATE'),
|
||||
26: this.localization('CHANGE STATE SLOT')
|
||||
}
|
||||
} else if ('snes' === this.getCore(true)) {
|
||||
buttons = {
|
||||
0: 'B',
|
||||
1: 'Y',
|
||||
2: 'SELECT',
|
||||
3: 'START',
|
||||
4: 'UP',
|
||||
5: 'DOWN',
|
||||
6: 'LEFT',
|
||||
7: 'RIGHT',
|
||||
8: 'A',
|
||||
9: 'X',
|
||||
10: 'L',
|
||||
11: 'R',
|
||||
24: this.localization('QUICK SAVE STATE'),
|
||||
25: this.localization('QUICK LOAD STATE'),
|
||||
26: this.localization('CHANGE STATE SLOT')
|
||||
};
|
||||
} else if ('n64' === this.getCore(true)) {
|
||||
buttons = {
|
||||
0: 'A',
|
||||
1: 'B',
|
||||
3: 'START',
|
||||
4: 'UP',
|
||||
5: 'DOWN',
|
||||
6: 'LEFT',
|
||||
7: 'RIGHT',
|
||||
10: 'L',
|
||||
11: 'R',
|
||||
12: 'Z',
|
||||
19: 'L STICK UP',
|
||||
18: 'L STICK DOWN',
|
||||
17: 'L STICK LEFT',
|
||||
16: 'L STICK RIGHT',
|
||||
23: 'R STICK UP',
|
||||
22: 'R STICK DOWN',
|
||||
21: 'R STICK LEFT',
|
||||
20: 'R STICK RIGHT',
|
||||
24: this.localization('QUICK SAVE STATE'),
|
||||
25: this.localization('QUICK LOAD STATE'),
|
||||
26: this.localization('CHANGE STATE SLOT')
|
||||
};
|
||||
} else if ('nds' === this.getCore(true)) {
|
||||
buttons = {
|
||||
0: 'B',
|
||||
1: 'Y',
|
||||
2: 'SELECT',
|
||||
3: 'START',
|
||||
4: 'UP',
|
||||
5: 'DOWN',
|
||||
6: 'LEFT',
|
||||
7: 'RIGHT',
|
||||
8: 'A',
|
||||
9: 'X',
|
||||
10: 'L',
|
||||
11: 'R',
|
||||
14: 'Microphone',
|
||||
24: this.localization('QUICK SAVE STATE'),
|
||||
25: this.localization('QUICK LOAD STATE'),
|
||||
26: this.localization('CHANGE STATE SLOT')
|
||||
};
|
||||
} else {
|
||||
buttons = {
|
||||
0: 'B',
|
||||
1: 'Y',
|
||||
2: 'SELECT',
|
||||
|
@ -1411,7 +1488,16 @@ class EmulatorJS {
|
|||
24: this.localization('QUICK SAVE STATE'),
|
||||
25: this.localization('QUICK LOAD STATE'),
|
||||
26: this.localization('CHANGE STATE SLOT')
|
||||
};
|
||||
}
|
||||
if (['arcade', 'mame'].includes(this.getCore(true))) {
|
||||
buttons[2] = this.localization('INSERT COIN');
|
||||
}
|
||||
//if (_this.statesSupported === false) {
|
||||
// delete buttons[24];
|
||||
// delete buttons[25];
|
||||
// delete buttons[26];
|
||||
//}
|
||||
let selectedPlayer;
|
||||
let players = [];
|
||||
let playerDivs = [];
|
||||
|
|
Loading…
Reference in a new issue