mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
(Menu controls) Keyboard 'Enter' does Retropad 'OK' and
Backspace does 'RetroPad Cancel'
This commit is contained in:
parent
44e309e7c8
commit
63d216ad1f
@ -190,12 +190,26 @@ static bool menu_init(menu_handle_t *menu_data)
|
||||
static void menu_input_key_event(bool down, unsigned keycode,
|
||||
uint32_t character, uint16_t mod)
|
||||
{
|
||||
menu_ctx_iterate_t iter;
|
||||
|
||||
(void)down;
|
||||
(void)keycode;
|
||||
(void)mod;
|
||||
|
||||
if (character == '/')
|
||||
menu_entry_action(NULL, 0, MENU_ACTION_SEARCH);
|
||||
|
||||
switch (keycode)
|
||||
{
|
||||
case RETROK_RETURN:
|
||||
iter.action = MENU_ACTION_OK;
|
||||
menu_driver_ctl(RARCH_MENU_CTL_ITERATE, &iter);
|
||||
break;
|
||||
case RETROK_BACKSPACE:
|
||||
iter.action = MENU_ACTION_CANCEL;
|
||||
menu_driver_ctl(RARCH_MENU_CTL_ITERATE, &iter);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void menu_driver_toggle(bool latch)
|
||||
|
Loading…
x
Reference in New Issue
Block a user