From ba82ca04d89a4eea65b81564180c12a1d5bd969a Mon Sep 17 00:00:00 2001 From: lizzie Date: Fri, 4 Sep 2026 23:57:52 +0000 Subject: [PATCH] 2026-09-04 23:57:52 Signed-off-by: lizzie --- src/yuzu/bootmanager.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp index f9c0233901..05ed5a437e 100644 --- a/src/yuzu/bootmanager.cpp +++ b/src/yuzu/bootmanager.cpp @@ -552,15 +552,13 @@ void GRenderWindow::ConstrainMouse() { const auto pos = mapFromGlobal(QCursor::pos()); const int new_pos_x = std::clamp(pos.x(), 0, width()); const int new_pos_y = std::clamp(pos.y(), 0, height()); - QCursor::setPos(mapToGlobal(QPoint{new_pos_x, new_pos_y})); - return; + } else { + const int center_x = width() / 2; + const int center_y = height() / 2; + QCursor::setPos(mapToGlobal(QPoint{center_x, center_y})); } - - const int center_x = width() / 2; - const int center_y = height() / 2; - - QCursor::setPos(mapToGlobal(QPoint{center_x, center_y})); + input_subsystem->GetMouse()->NotifyChanged(); // required to reset mouse once it's no longer moved } void GRenderWindow::wheelEvent(QWheelEvent* event) {