analogipt: make inc/dec slider control consistent with other sliders where holding ctrl = 'big steps'

This commit is contained in:
hap 2025-01-08 20:47:39 +01:00
parent 63872aebf3
commit 2aa429f405

View File

@ -487,6 +487,7 @@ bool menu_analog::handle(event const *ev)
{
item_data &data(*reinterpret_cast<item_data *>(ev->itemref));
int newval(data.cur);
bool const ctrl_pressed = machine().input().code_pressed(KEYCODE_LCONTROL) || machine().input().code_pressed(KEYCODE_RCONTROL);
switch (ev->iptkey)
{
@ -503,12 +504,12 @@ bool menu_analog::handle(event const *ev)
// left decrements
case IPT_UI_LEFT:
newval -= machine().input().code_pressed(KEYCODE_LSHIFT) ? 10 : 1;
newval -= ctrl_pressed ? 10 : 1;
break;
// right increments
case IPT_UI_RIGHT:
newval += machine().input().code_pressed(KEYCODE_LSHIFT) ? 10 : 1;
newval += ctrl_pressed ? 10 : 1;
break;
// move to first item for previous device