From 2aa429f405595e7cec5023e8d7db6d5bf247c7e2 Mon Sep 17 00:00:00 2001 From: hap Date: Wed, 8 Jan 2025 20:47:39 +0100 Subject: [PATCH] analogipt: make inc/dec slider control consistent with other sliders where holding ctrl = 'big steps' --- src/frontend/mame/ui/analogipt.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/frontend/mame/ui/analogipt.cpp b/src/frontend/mame/ui/analogipt.cpp index 14b09f9c23d..b126d22cfec 100644 --- a/src/frontend/mame/ui/analogipt.cpp +++ b/src/frontend/mame/ui/analogipt.cpp @@ -487,6 +487,7 @@ bool menu_analog::handle(event const *ev) { item_data &data(*reinterpret_cast(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