From 1638b63a4c06a85f5d777bc82e0eb8c17b1afcd3 Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Tue, 12 Oct 2021 04:20:12 +0200 Subject: [PATCH] early-access version 2122 --- README.md | 2 +- .../configuration/configure_input_player_widget.cpp | 4 ++-- src/yuzu/debugger/profiler.cpp | 12 ++++++++---- src/yuzu/game_list.cpp | 3 +-- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 3d306778c..8a0980eca 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 2121. +This is the source code for early-access 2122. ## Legal Notice diff --git a/src/yuzu/configuration/configure_input_player_widget.cpp b/src/yuzu/configuration/configure_input_player_widget.cpp index da328d904..f31f86339 100755 --- a/src/yuzu/configuration/configure_input_player_widget.cpp +++ b/src/yuzu/configuration/configure_input_player_widget.cpp @@ -1837,7 +1837,7 @@ void PlayerControlPreview::DrawLeftBody(QPainter& p, const QPointF center) { const float led_size = 5.0f; const QPointF led_position = sideview_center + QPointF(0, -36); int led_count = 0; - for (const auto color : led_color) { + for (const auto& color : led_color) { p.setBrush(color); DrawRectangle(p, led_position + QPointF(0, 12 * led_count++), led_size, led_size); } @@ -1933,7 +1933,7 @@ void PlayerControlPreview::DrawRightBody(QPainter& p, const QPointF center) { const float led_size = 5.0f; const QPointF led_position = sideview_center + QPointF(0, -36); int led_count = 0; - for (const auto color : led_color) { + for (const auto& color : led_color) { p.setBrush(color); DrawRectangle(p, led_position + QPointF(0, 12 * led_count++), led_size, led_size); } diff --git a/src/yuzu/debugger/profiler.cpp b/src/yuzu/debugger/profiler.cpp index 7a6f84d96..33110685a 100755 --- a/src/yuzu/debugger/profiler.cpp +++ b/src/yuzu/debugger/profiler.cpp @@ -143,24 +143,28 @@ 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->pos().x() / x_scale, ev->pos().y() / y_scale, + const auto wheel_position = ev->position().toPoint(); + MicroProfileMousePosition(wheel_position.x() / x_scale, wheel_position.y() / y_scale, ev->angleDelta().y() / 120); ev->accept(); } diff --git a/src/yuzu/game_list.cpp b/src/yuzu/game_list.cpp index 99c91a6a8..6bd0f9ee9 100755 --- a/src/yuzu/game_list.cpp +++ b/src/yuzu/game_list.cpp @@ -159,8 +159,7 @@ GameListSearchField::GameListSearchField(GameList* parent) : QWidget{parent} { * @return true if the haystack contains all words of userinput */ static bool ContainsAllWords(const QString& haystack, const QString& userinput) { - const QStringList userinput_split = - userinput.split(QLatin1Char{' '}, QString::SplitBehavior::SkipEmptyParts); + const QStringList userinput_split = userinput.split(QLatin1Char{' '}, Qt::SkipEmptyParts); return std::all_of(userinput_split.begin(), userinput_split.end(), [&haystack](const QString& s) { return haystack.contains(s); });