1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Make long tap delay customizable and change default to 400ms

This commit is contained in:
Gregor Parzefall 2024-03-24 21:55:39 +01:00 committed by grorp
parent 517f1602aa
commit 8935f2af3c
4 changed files with 15 additions and 8 deletions

View file

@ -414,6 +414,7 @@ TouchScreenGUI::TouchScreenGUI(IrrlichtDevice *device, IEventReceiver *receiver)
}
m_touchscreen_threshold = g_settings->getU16("touchscreen_threshold");
m_long_tap_delay = g_settings->getU16("touch_long_tap_delay");
m_fixed_joystick = g_settings->getBool("fixed_virtual_joystick");
m_joystick_triggers_aux1 = g_settings->getBool("virtual_joystick_triggers_aux1");
m_screensize = m_device->getVideoDriver()->getScreenSize();
@ -999,7 +1000,7 @@ void TouchScreenGUI::step(float dtime)
if (m_has_move_id && !m_move_has_really_moved && m_tap_state == TapState::None) {
u64 delta = porting::getDeltaMs(m_move_downtime, porting::getTimeMs());
if (delta > MIN_DIG_TIME_MS) {
if (delta > m_long_tap_delay) {
m_tap_state = TapState::LongTap;
}
}