From 961239ac8d90cf51ddfe272400ca80142e1490fd Mon Sep 17 00:00:00 2001 From: Megamouse Date: Thu, 8 Aug 2024 04:13:11 +0200 Subject: [PATCH] Qt/input: make touch_threshold a member Maybe we need will need it for a different handler in the future --- rpcs3/Emu/Io/PadHandler.cpp | 2 -- rpcs3/Emu/Io/PadHandler.h | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/rpcs3/Emu/Io/PadHandler.cpp b/rpcs3/Emu/Io/PadHandler.cpp index fe9a12a49b..dc683cf584 100644 --- a/rpcs3/Emu/Io/PadHandler.cpp +++ b/rpcs3/Emu/Io/PadHandler.cpp @@ -269,8 +269,6 @@ PadHandlerBase::connection PadHandlerBase::get_next_button_press(const std::stri continue; } - constexpr u16 touch_threshold = static_cast(255 * 0.9f); - const bool is_trigger = get_is_left_trigger(device, keycode) || get_is_right_trigger(device, keycode); const bool is_stick = !is_trigger && (get_is_left_stick(device, keycode) || get_is_right_stick(device, keycode)); const bool is_touch_motion = !is_trigger && !is_stick && get_is_touch_pad_motion(device, keycode); diff --git a/rpcs3/Emu/Io/PadHandler.h b/rpcs3/Emu/Io/PadHandler.h index aadadf868a..798b289d49 100644 --- a/rpcs3/Emu/Io/PadHandler.h +++ b/rpcs3/Emu/Io/PadHandler.h @@ -112,6 +112,7 @@ protected: static constexpr u32 MAX_GAMEPADS = 7; static constexpr u16 button_press_threshold = 50; + static constexpr u16 touch_threshold = static_cast(255 * 0.9f); std::array last_connection_status{{ false, false, false, false, false, false, false }};