From 3a8f5d385ffb875ed529a0cf5ae915c64e36ce4c Mon Sep 17 00:00:00 2001 From: Purple <38256064+IamSanjid@users.noreply.github.com> Date: Tue, 12 Apr 2022 01:16:14 +0600 Subject: [PATCH] stop the mouse centering timer if the main window is not active Co-authored-by: Narr the Reg --- src/yuzu/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index d5e438f2a5..b29041894d 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -3310,6 +3310,10 @@ void GMainWindow::CenterMouseCursor() { mouse_center_timer.stop(); return; } + if (!this->isActiveWindow()) { + mouse_center_timer.stop(); + return; + } const int center_x = render_window->width() / 2; const int center_y = render_window->height() / 2;