1
0
mirror of synced 2025-02-24 06:03:21 +01:00

Map TEST_BUTTON for evdev input

This commit is contained in:
Hein-Pieter van Braam 2024-12-29 00:52:35 +01:00
parent 603eb118ef
commit 8b79964f66
2 changed files with 6 additions and 0 deletions

View File

@ -117,6 +117,8 @@
# EVDEV MODE (Input Mode 2)
# To find the value pairs for these run ./lindbergh --list-controllers
# TEST_BUTTON AT_TRANSLATED_SET_2_KEYBOARD_KEY_Z
# PLAYER_1_BUTTON_START AT_TRANSLATED_SET_2_KEYBOARD_KEY_1
# PLAYER_1_BUTTON_SERVICE AT_TRANSLATED_SET_2_KEYBOARD_KEY_S
# PLAYER_1_BUTTON_UP AT_TRANSLATED_SET_2_KEYBOARD_KEY_UP

View File

@ -857,6 +857,10 @@ int readConfig(FILE *configFile, EmulatorConfig *config)
else if (strcmp(command, "PLAYER_1_BUTTON_8_KEY") == 0)
config->keymap.player1.button8 = atoi(getNextToken(NULL, " ", &saveptr));
// Evdev TEST button
else if (strcmp(command, "TEST_BUTTON") == 0)
strncpy(config->arcadeInputs.test, getNextToken(NULL, " ", &saveptr), INPUT_STRING_LENGTH - 1);
// Player 1 controls
else if (strcmp(command, "PLAYER_1_BUTTON_START") == 0)
strncpy(config->arcadeInputs.player1_button_start, getNextToken(NULL, " ", &saveptr),