From 92d07072915b99917892dd7833c06eb44a09e234 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Tue, 7 Jan 2025 18:21:10 +0100 Subject: [PATCH] Decrease mouse move assignment distance --- rpcs3/rpcs3qt/pad_settings_dialog.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/rpcs3/rpcs3qt/pad_settings_dialog.cpp b/rpcs3/rpcs3qt/pad_settings_dialog.cpp index 1fbd63aad5..c4e04cdc65 100644 --- a/rpcs3/rpcs3qt/pad_settings_dialog.cpp +++ b/rpcs3/rpcs3qt/pad_settings_dialog.cpp @@ -996,25 +996,26 @@ void pad_settings_dialog::mouseMoveEvent(QMouseEvent* event) } else { + constexpr int delta_threshold = 20; const QPoint mouse_pos = QCursor::pos(); const int delta_x = mouse_pos.x() - m_last_pos.x(); const int delta_y = mouse_pos.y() - m_last_pos.y(); u32 key = 0; - if (delta_x > 100) + if (delta_x > delta_threshold) { key = mouse::move_right; } - else if (delta_x < -100) + else if (delta_x < -delta_threshold) { key = mouse::move_left; } - else if (delta_y > 100) + else if (delta_y > delta_threshold) { key = mouse::move_down; } - else if (delta_y < -100) + else if (delta_y < -delta_threshold) { key = mouse::move_up; }