diff --git a/input.cpp b/input.cpp index d5191e1..2070131 100644 --- a/input.cpp +++ b/input.cpp @@ -1911,7 +1911,10 @@ static void input_cb(struct input_event *ev, struct input_absinfo *absinfo, int input[dev].osd_combo = 0; int found = 0; - for (int i = (mapping_button >= BUTTON_DPAD_COUNT) ? BUTTON_DPAD_COUNT : 0; i < mapping_button; i++) if (input[dev].map[i] == ev->code) found = 1; + if (mapping_button < SYS_BTN_CNT_OK) + { + for (int i = (mapping_button >= BUTTON_DPAD_COUNT) ? BUTTON_DPAD_COUNT : 0; i < mapping_button; i++) if (input[dev].map[i] == ev->code) found = 1; + } if (!found || (mapping_button == SYS_BTN_OSD_KTGL && mapping_type)) { diff --git a/menu.cpp b/menu.cpp index b25116b..775dce6 100644 --- a/menu.cpp +++ b/menu.cpp @@ -4289,11 +4289,11 @@ void HandleUI(void) strcpy(joy_bnames[SYS_MS_BTN_L - DPAD_NAMES], "Mouse Btn Left"); strcpy(joy_bnames[SYS_MS_BTN_R - DPAD_NAMES], "Mouse Btn Right"); strcpy(joy_bnames[SYS_MS_BTN_M - DPAD_NAMES], "Mouse Btn Middle"); - strcpy(joy_bnames[SYS_MS_BTN_EMU - DPAD_NAMES], "Mouse Emu / Sniper"); + strcpy(joy_bnames[SYS_MS_BTN_EMU - DPAD_NAMES], "Mouse Emu/Sniper"); strcpy(joy_bnames[SYS_BTN_OSD_KTGL - DPAD_NAMES], "Menu"); strcpy(joy_bnames[SYS_BTN_CNT_OK - DPAD_NAMES], "Menu: OK"); strcpy(joy_bnames[SYS_BTN_CNT_ESC - DPAD_NAMES], "Menu: Back"); - joy_bcount = 18+1; //buttons + OSD/KTGL button + joy_bcount = 20+1; //buttons + OSD/KTGL button start_map_setting(joy_bcount + 6); // + dpad + Analog X/Y menustate = MENU_JOYDIGMAP; menusub = 0;