mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-06 06:51:26 +12:00
Decrease mouse move assignment distance
This commit is contained in:
parent
c6f3737c2a
commit
92d0707291
1 changed files with 5 additions and 4 deletions
|
@ -996,25 +996,26 @@ void pad_settings_dialog::mouseMoveEvent(QMouseEvent* event)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
constexpr int delta_threshold = 20;
|
||||||
const QPoint mouse_pos = QCursor::pos();
|
const QPoint mouse_pos = QCursor::pos();
|
||||||
const int delta_x = mouse_pos.x() - m_last_pos.x();
|
const int delta_x = mouse_pos.x() - m_last_pos.x();
|
||||||
const int delta_y = mouse_pos.y() - m_last_pos.y();
|
const int delta_y = mouse_pos.y() - m_last_pos.y();
|
||||||
|
|
||||||
u32 key = 0;
|
u32 key = 0;
|
||||||
|
|
||||||
if (delta_x > 100)
|
if (delta_x > delta_threshold)
|
||||||
{
|
{
|
||||||
key = mouse::move_right;
|
key = mouse::move_right;
|
||||||
}
|
}
|
||||||
else if (delta_x < -100)
|
else if (delta_x < -delta_threshold)
|
||||||
{
|
{
|
||||||
key = mouse::move_left;
|
key = mouse::move_left;
|
||||||
}
|
}
|
||||||
else if (delta_y > 100)
|
else if (delta_y > delta_threshold)
|
||||||
{
|
{
|
||||||
key = mouse::move_down;
|
key = mouse::move_down;
|
||||||
}
|
}
|
||||||
else if (delta_y < -100)
|
else if (delta_y < -delta_threshold)
|
||||||
{
|
{
|
||||||
key = mouse::move_up;
|
key = mouse::move_up;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue