Replace the hasMultitap option with a more general solution

The new hid option enables users to map a specific Libretro device (or multiple devices) to the input ports. For instance, this allows users to map a Multitap controller with the snes9x core.
This commit is contained in:
Sergey Stepanov 2024-03-05 21:34:37 +03:00
parent cdbb5e98f5
commit 91ace06f8b
No known key found for this signature in database
GPG key ID: A56B4929BAA8556B
17 changed files with 47 additions and 88 deletions

View file

@ -123,7 +123,7 @@
<script src="js/event/event.js?v=5"></script>
<script src="js/input/keys.js?v=3"></script>
<script src="js/settings/opts.js?v=2"></script>
<script src="js/settings/settings.js?v=4"></script>
<script src="js/settings/settings.js?v=5"></script>
<script src="js/env.js?v=5"></script>
<script src="js/input/input.js?v=3"></script>
<script src="js/gameList.js?v=3"></script>
@ -136,7 +136,7 @@
<script src="js/api/api.js?v=3"></script>
<script src="js/workerManager.js?v=1"></script>
<script src="js/stats/stats.js?v=1"></script>
<script src="js/controller.js?v=9"></script>
<script src="js/controller.js?v=10"></script>
<script src="js/input/keyboard.js?v=6"></script>
<script src="js/input/touch.js?v=3"></script>
<script src="js/input/joystick.js?v=3"></script>

View file

@ -17,7 +17,6 @@ const api = (() => {
GAME_SAVE: 106,
GAME_LOAD: 107,
GAME_SET_PLAYER_INDEX: 108,
GAME_TOGGLE_MULTITAP: 109,
GAME_RECORDING: 110,
GET_WORKER_LIST: 111,
GAME_ERROR_NO_FREE_SLOTS: 112,
@ -58,7 +57,6 @@ const api = (() => {
record: record,
record_user: recordUser,
}),
toggleMultitap: () => packet(endpoints.GAME_TOGGLE_MULTITAP),
toggleRecording: (active = false, userName = '') =>
packet(endpoints.GAME_RECORDING, {
active: active,

View file

@ -393,9 +393,6 @@
case KEY.PAD4:
updatePlayerIndex(3);
break;
case KEY.MULTITAP:
api.game.toggleMultitap();
break;
case KEY.QUIT:
input.poll.disable();
api.game.quit(room.getId());

View file

@ -35,7 +35,6 @@ const keyboard = (() => {
KeyH: KEY.HELP,
Backslash: KEY.STATS,
Digit9: KEY.SETTINGS,
KeyM: KEY.MULTITAP,
KeyT: KEY.DTOGGLE
});

View file

@ -29,7 +29,6 @@ const KEY = (() => {
R2: 'r2',
L3: 'l3',
R3: 'r3',
MULTITAP: 'multitap',
REC: 'rec',
}
})();

View file

@ -15,7 +15,7 @@
*/
const settings = (() => {
// internal structure version
const revision = 1.3;
const revision = 1.4;
// default settings
// keep them for revert to defaults option