1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 02:32:36 +01:00

Qt/input: make touch_threshold a member

Maybe we need will need it for a different handler in the future
This commit is contained in:
Megamouse 2024-08-08 04:13:11 +02:00
parent 326375ad9a
commit 961239ac8d
2 changed files with 1 additions and 2 deletions

View File

@ -269,8 +269,6 @@ PadHandlerBase::connection PadHandlerBase::get_next_button_press(const std::stri
continue;
}
constexpr u16 touch_threshold = static_cast<u16>(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);

View File

@ -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<u16>(255 * 0.9f);
std::array<bool, MAX_GAMEPADS> last_connection_status{{ false, false, false, false, false, false, false }};