Menu navigation acceleration adjustments

This commit is contained in:
sonninnos 2023-06-18 23:01:33 +03:00 committed by LibretroAdmin
parent 5caebf3675
commit a7ac52fe91
1 changed files with 15 additions and 19 deletions

View File

@ -5077,11 +5077,9 @@ unsigned menu_event(
menu_input_t *menu_input = &menu_st->input_state;
input_driver_state_t *input_st = input_state_get_ptr();
input_driver_t *current_input = input_st->current_driver;
const input_device_driver_t
*joypad = input_st->primary_joypad;
const input_device_driver_t *joypad = input_st->primary_joypad;
#ifdef HAVE_MFI
const input_device_driver_t *sec_joypad =
input_st->secondary_joypad;
const input_device_driver_t *sec_joypad = input_st->secondary_joypad;
#else
const input_device_driver_t *sec_joypad = NULL;
#endif
@ -5096,8 +5094,7 @@ unsigned menu_event(
bool menu_scroll_fast = settings->bools.menu_scroll_fast;
bool pointer_enabled = settings->bools.menu_pointer_enable;
unsigned input_touch_scale = settings->uints.input_touch_scale;
unsigned menu_scroll_delay =
settings->uints.menu_scroll_delay;
unsigned menu_scroll_delay = settings->uints.menu_scroll_delay;
#ifdef HAVE_OVERLAY
bool input_overlay_enable = settings->bools.input_overlay_enable;
bool overlay_active = input_overlay_enable
@ -5270,11 +5267,11 @@ unsigned menu_event(
* for old_input_state. */
first_held = true;
delay_count = 0;
if (initial_held)
delay_timer = menu_scroll_delay;
else
delay_timer = menu_scroll_fast ? 100 : 20;
delay_count = 0;
delay_timer = menu_scroll_delay / 8;
}
if (delay_count >= delay_timer)
@ -5289,12 +5286,13 @@ unsigned menu_event(
new_scroll_accel = menu_st->scroll.acceleration;
if (menu_scroll_fast)
new_scroll_accel = MIN(new_scroll_accel + 1, 64);
new_scroll_accel = MIN(new_scroll_accel + 1, 25);
else
new_scroll_accel = MIN(new_scroll_accel + 1, 5);
}
initial_held = false;
delay_count += anim_get_ptr()->delta_time;
}
else
{
@ -5307,8 +5305,6 @@ unsigned menu_event(
if (set_scroll)
menu_st->scroll.acceleration = (unsigned)(new_scroll_accel);
delay_count += anim_get_ptr()->delta_time;
if (display_kb)
{
#ifdef HAVE_MIST