mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 19:45:20 +00:00
Decrease mouse move assignment distance
This commit is contained in:
parent
ec77f2ab92
commit
15edf8eb9b
1 changed files with 5 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue