summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Failliot <romain.failliot@foolstep.com>2021-10-11 16:59:49 +0200
committerRomain Failliot <romain.failliot@foolstep.com>2021-10-12 01:21:24 +0200
commit39b3c9022dc34b1f0e64278b88346c03003f5019 (patch)
treebf0069c5ca696b573fcfc674224ad85d652282f1
parentFix a few warnings (diff)
downloadyuzu-39b3c9022dc34b1f0e64278b88346c03003f5019.tar
yuzu-39b3c9022dc34b1f0e64278b88346c03003f5019.tar.gz
yuzu-39b3c9022dc34b1f0e64278b88346c03003f5019.tar.bz2
yuzu-39b3c9022dc34b1f0e64278b88346c03003f5019.tar.lz
yuzu-39b3c9022dc34b1f0e64278b88346c03003f5019.tar.xz
yuzu-39b3c9022dc34b1f0e64278b88346c03003f5019.tar.zst
yuzu-39b3c9022dc34b1f0e64278b88346c03003f5019.zip
-rw-r--r--src/yuzu/debugger/profiler.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/yuzu/debugger/profiler.cpp b/src/yuzu/debugger/profiler.cpp
index 778c25a9f..33110685a 100644
--- a/src/yuzu/debugger/profiler.cpp
+++ b/src/yuzu/debugger/profiler.cpp
@@ -143,25 +143,29 @@ void MicroProfileWidget::hideEvent(QHideEvent* ev) {
}
void MicroProfileWidget::mouseMoveEvent(QMouseEvent* ev) {
- MicroProfileMousePosition(ev->pos().x() / x_scale, ev->pos().y() / y_scale, 0);
+ const auto mouse_position = ev->pos();
+ MicroProfileMousePosition(mouse_position.x() / x_scale, mouse_position.y() / y_scale, 0);
ev->accept();
}
void MicroProfileWidget::mousePressEvent(QMouseEvent* ev) {
- MicroProfileMousePosition(ev->pos().x() / x_scale, ev->pos().y() / y_scale, 0);
+ const auto mouse_position = ev->pos();
+ MicroProfileMousePosition(mouse_position.x() / x_scale, mouse_position.y() / y_scale, 0);
MicroProfileMouseButton(ev->buttons() & Qt::LeftButton, ev->buttons() & Qt::RightButton);
ev->accept();
}
void MicroProfileWidget::mouseReleaseEvent(QMouseEvent* ev) {
- MicroProfileMousePosition(ev->pos().x() / x_scale, ev->pos().y() / y_scale, 0);
+ const auto mouse_position = ev->pos();
+ MicroProfileMousePosition(mouse_position.x() / x_scale, mouse_position.y() / y_scale, 0);
MicroProfileMouseButton(ev->buttons() & Qt::LeftButton, ev->buttons() & Qt::RightButton);
ev->accept();
}
void MicroProfileWidget::wheelEvent(QWheelEvent* ev) {
- MicroProfileMousePosition(ev->position().toPoint().x() / x_scale,
- ev->position().toPoint().y() / y_scale, ev->angleDelta().y() / 120);
+ const auto wheel_position = ev->position().toPoint();
+ MicroProfileMousePosition(wheel_position.x() / x_scale, wheel_position.y() / y_scale,
+ ev->angleDelta().y() / 120);
ev->accept();
}