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.
This commit is contained in:
Matheus Fraguas
2022-05-30 16:29:38 -03:00
committed by GitHub
parent 1bce9c51f9
commit 439db2d5bc

View File

@@ -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;