input: tweak the initial mapping.

This commit is contained in:
sorgelig
2019-12-30 20:34:01 +08:00
parent d4a471f803
commit 64f75d3d57
2 changed files with 6 additions and 3 deletions

View File

@@ -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))
{

View File

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