mirror of
https://github.com/holub/mame
synced 2025-04-19 23:12:11 +03:00
analogipt: make inc/dec slider control consistent with other sliders where holding ctrl = 'big steps'
This commit is contained in:
parent
63872aebf3
commit
2aa429f405
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user