mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-04-21 03:55:04 +00:00
fix: mouse wheel crash
Change-Id: I1976037cf0872e89fc08c8afdbd3fde79a8df061
This commit is contained in:
parent
b54f3d2d33
commit
dbbf7cf3e1
1 changed files with 2 additions and 2 deletions
|
@ -55,8 +55,8 @@ void InputConvertNormal::wheelEvent(const QWheelEvent *from, const QSize &frameS
|
|||
}
|
||||
|
||||
// delta
|
||||
qint32 hScroll = from->angleDelta().x() / abs(from->angleDelta().x()) * 2;
|
||||
qint32 vScroll = from->angleDelta().y() / abs(from->angleDelta().y()) * 2;
|
||||
qint32 hScroll = from->angleDelta().x() == 0 ? 0 : from->angleDelta().x() / abs(from->angleDelta().x()) * 2;
|
||||
qint32 vScroll = from->angleDelta().y() == 0 ? 0 : from->angleDelta().y() / abs(from->angleDelta().y()) * 2;
|
||||
|
||||
// pos
|
||||
QPointF pos = from->position();
|
||||
|
|
Loading…
Add table
Reference in a new issue