Merge pull request #26 from hpvb/map-test-button

Map TEST_BUTTON for evdev input
This commit is contained in:
Bobby Dilley
2024-12-29 22:04:52 +00:00
committed by GitHub
2 changed files with 6 additions and 0 deletions
+2
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
+4
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),