mirror of
https://github.com/libretro/RetroArch
synced 2025-04-07 13:23:32 +00:00
Merge pull request #7874 from markwkidd/patch-7
unify input bind hold behavior across platforms
This commit is contained in:
commit
d46a60bb2b
@ -764,7 +764,7 @@ static const unsigned input_poll_type_behavior = 2;
|
||||
|
||||
static const unsigned input_bind_timeout = 5;
|
||||
|
||||
static const unsigned input_bind_hold = 2;
|
||||
static const unsigned input_bind_hold = 1;
|
||||
|
||||
static const unsigned menu_thumbnails_default = 3;
|
||||
|
||||
|
@ -584,11 +584,19 @@ bool menu_input_key_bind_iterate(menu_input_ctx_bind_t *bind)
|
||||
input_driver_keyboard_mapping_set_block( true );
|
||||
menu_input_key_bind_poll_bind_state( &binds, menu_bind_port, timed_out );
|
||||
|
||||
#ifdef ANDROID
|
||||
|
||||
/*keep resetting bind during the hold period, or we'll potentially bind joystick and mouse, etc.*/
|
||||
binds.buffer = *( binds.output );
|
||||
|
||||
if ( settings->uints.input_bind_timeout == 0 )
|
||||
{
|
||||
if ( ( binds.skip && !menu_input_binds.skip ) ||
|
||||
menu_input_key_bind_poll_find_trigger( &menu_input_binds, &binds, &( binds.buffer ) ) )
|
||||
{
|
||||
complete = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( menu_input_key_bind_poll_find_hold( &binds, &binds.buffer ) )
|
||||
{
|
||||
/*inhibit timeout*/
|
||||
@ -613,17 +621,8 @@ bool menu_input_key_bind_iterate(menu_input_ctx_bind_t *bind)
|
||||
/*reset hold countdown*/
|
||||
rarch_timer_begin_new_time( &binds.timer_hold, settings->uints.input_bind_hold );
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
if ( ( binds.skip && !menu_input_binds.skip ) ||
|
||||
menu_input_key_bind_poll_find_trigger( &menu_input_binds, &binds, &( binds.buffer ) ) )
|
||||
{
|
||||
complete = true;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
if ( complete )
|
||||
{
|
||||
/*update bind*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user