input: fix mapping.

This commit is contained in:
Sorgelig
2023-09-12 04:04:37 +08:00
parent ce9daf6de9
commit a1c64c955c

View File

@@ -2617,7 +2617,7 @@ static void input_cb(struct input_event *ev, struct input_absinfo *absinfo, int
if ((ev->type == EV_ABS || ev->type == EV_REL) && (ev->code == 7 || ev->code == 8) && input[dev].quirk != QUIRK_WHEEL) return;
// protection against joysticks generating 2 codes per button
if (ev->type == EV_KEY && !(mapping < 2 && mapping_button == SYS_BTN_OSD_KTGL) && !map_skip)
if (ev->type == EV_KEY && !(is_menu() && mapping < 2 && mapping_button == SYS_BTN_OSD_KTGL) && !map_skip)
{
if (!mapping_current_key)
{
@@ -2638,6 +2638,8 @@ static void input_cb(struct input_event *ev, struct input_absinfo *absinfo, int
}
}
if (map_skip) mapping_current_key = 0;
if (ev->type == EV_KEY && mapping_button>=0 && !osd_event)
{
if (mapping_type == 2) // keyboard remap