diff options
| author | spycrab <spycrab@users.noreply.github.com> | 2019-03-26 00:38:25 +0100 |
|---|---|---|
| committer | spycrab <spycrab@users.noreply.github.com> | 2019-03-26 00:38:25 +0100 |
| commit | 04583b17da28312166c92a686d2fdf6a95492976 (patch) | |
| tree | bcdf325e28e0322218018dc9aadab42661953359 /Source/Core | |
| parent | 8bad3f93f134efeaecc2483f5ede374064f64563 (diff) | |
Qt/TAS: Fix issue #11620
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/DolphinQt/TAS/IRWidget.cpp | 4 | ||||
| -rw-r--r-- | Source/Core/DolphinQt/TAS/IRWidget.h | 1 | ||||
| -rw-r--r-- | Source/Core/DolphinQt/TAS/StickWidget.cpp | 4 | ||||
| -rw-r--r-- | Source/Core/DolphinQt/TAS/StickWidget.h | 1 |
4 files changed, 8 insertions, 2 deletions
diff --git a/Source/Core/DolphinQt/TAS/IRWidget.cpp b/Source/Core/DolphinQt/TAS/IRWidget.cpp index 2943d590ee..fe1b31e73c 100644 --- a/Source/Core/DolphinQt/TAS/IRWidget.cpp +++ b/Source/Core/DolphinQt/TAS/IRWidget.cpp @@ -61,11 +61,13 @@ void IRWidget::paintEvent(QPaintEvent* event) void IRWidget::mousePressEvent(QMouseEvent* event) { handleMouseEvent(event); + m_ignore_movement = event->button() == Qt::RightButton; } void IRWidget::mouseMoveEvent(QMouseEvent* event) { - handleMouseEvent(event); + if (!m_ignore_movement) + handleMouseEvent(event); } void IRWidget::handleMouseEvent(QMouseEvent* event) diff --git a/Source/Core/DolphinQt/TAS/IRWidget.h b/Source/Core/DolphinQt/TAS/IRWidget.h index abf8ffdb92..f269a7ec63 100644 --- a/Source/Core/DolphinQt/TAS/IRWidget.h +++ b/Source/Core/DolphinQt/TAS/IRWidget.h @@ -31,6 +31,7 @@ protected: private: u16 m_x = 0; u16 m_y = 0; + bool m_ignore_movement = false; }; // Should be part of class but fails to compile on mac os diff --git a/Source/Core/DolphinQt/TAS/StickWidget.cpp b/Source/Core/DolphinQt/TAS/StickWidget.cpp index 4e79fa85c0..b6ce40a7e4 100644 --- a/Source/Core/DolphinQt/TAS/StickWidget.cpp +++ b/Source/Core/DolphinQt/TAS/StickWidget.cpp @@ -62,11 +62,13 @@ void StickWidget::paintEvent(QPaintEvent* event) void StickWidget::mousePressEvent(QMouseEvent* event) { handleMouseEvent(event); + m_ignore_movement = event->button() == Qt::RightButton; } void StickWidget::mouseMoveEvent(QMouseEvent* event) { - handleMouseEvent(event); + if (!m_ignore_movement) + handleMouseEvent(event); } void StickWidget::handleMouseEvent(QMouseEvent* event) diff --git a/Source/Core/DolphinQt/TAS/StickWidget.h b/Source/Core/DolphinQt/TAS/StickWidget.h index eec6d1c633..e23acdbea2 100644 --- a/Source/Core/DolphinQt/TAS/StickWidget.h +++ b/Source/Core/DolphinQt/TAS/StickWidget.h @@ -33,4 +33,5 @@ private: u16 m_max_y; u16 m_x = 0; u16 m_y = 0; + bool m_ignore_movement = false; }; |
