mirror of
https://github.com/libretro/RetroArch
synced 2025-02-06 09:40:06 +00:00
allow closing text input windows with cancel button
This commit is contained in:
parent
909513e7ca
commit
8929887f25
@ -243,7 +243,7 @@ static bool dinput_is_pressed(struct dinput_input *di,
|
||||
if (id >= RARCH_BIND_LIST_END)
|
||||
return false;
|
||||
|
||||
return dinput_keyboard_pressed(di, bind->key) ||
|
||||
return (!di->blocked && dinput_keyboard_pressed(di, bind->key)) ||
|
||||
input_joypad_pressed(di->joypad, port, binds, id);
|
||||
}
|
||||
|
||||
|
@ -1017,8 +1017,15 @@ unsigned menu_input_frame(retro_input_t input, retro_input_t trigger_input)
|
||||
|
||||
menu_input->delay.count += disp->animation->delta_time / IDEAL_DT;
|
||||
|
||||
if (input_driver_keyboard_mapping_is_blocked())
|
||||
if (menu_input->keyboard.display)
|
||||
{
|
||||
// send return key to close keyboard input window
|
||||
if (trigger_input & (1ULL << settings->menu_cancel_btn))
|
||||
input_keyboard_event(true, '\n', '\n', 0, RETRO_DEVICE_KEYBOARD);
|
||||
|
||||
trigger_input = 0;
|
||||
}
|
||||
|
||||
if (trigger_input & (1ULL << RETRO_DEVICE_ID_JOYPAD_UP))
|
||||
ret = MENU_ACTION_UP;
|
||||
else if (trigger_input & (1ULL << RETRO_DEVICE_ID_JOYPAD_DOWN))
|
||||
|
Loading…
x
Reference in New Issue
Block a user