mirror of
https://github.com/holub/mame
synced 2025-06-30 16:00:01 +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));
|
item_data &data(*reinterpret_cast<item_data *>(ev->itemref));
|
||||||
int newval(data.cur);
|
int newval(data.cur);
|
||||||
|
bool const ctrl_pressed = machine().input().code_pressed(KEYCODE_LCONTROL) || machine().input().code_pressed(KEYCODE_RCONTROL);
|
||||||
|
|
||||||
switch (ev->iptkey)
|
switch (ev->iptkey)
|
||||||
{
|
{
|
||||||
@ -503,12 +504,12 @@ bool menu_analog::handle(event const *ev)
|
|||||||
|
|
||||||
// left decrements
|
// left decrements
|
||||||
case IPT_UI_LEFT:
|
case IPT_UI_LEFT:
|
||||||
newval -= machine().input().code_pressed(KEYCODE_LSHIFT) ? 10 : 1;
|
newval -= ctrl_pressed ? 10 : 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// right increments
|
// right increments
|
||||||
case IPT_UI_RIGHT:
|
case IPT_UI_RIGHT:
|
||||||
newval += machine().input().code_pressed(KEYCODE_LSHIFT) ? 10 : 1;
|
newval += ctrl_pressed ? 10 : 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// move to first item for previous device
|
// move to first item for previous device
|
||||||
|
Loading…
Reference in New Issue
Block a user