From 439db2d5bcf9871c2a1b7dadd3542f1c876f42e1 Mon Sep 17 00:00:00 2001 From: Matheus Fraguas Date: Mon, 30 May 2022 16:29:38 -0300 Subject: [PATCH] input: Also uses joystick button on lightgun calibration (#627) Previous implementation only catchs gamepad buttons BTN_GAMEPAD. This commit add support for joystick button BTN_JOYSTICK. Useful for lightgun devices using HID report type Joystick. --- menu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/menu.cpp b/menu.cpp index fa9f23e..4a7488c 100644 --- a/menu.cpp +++ b/menu.cpp @@ -6898,7 +6898,7 @@ int menu_lightgun_cb(int idx, uint16_t type, uint16_t code, int value) if (type == EV_KEY) { - if ((code == 0x130 || code == 0x131) && menustate == MENU_LGCAL1) + if ((code == 0x130 || code == 0x131 || code == 0x120) && menustate == MENU_LGCAL1) { gun_idx = idx; if (value == 1) gun_ok = 1;