From 7bb952df3e9ff1eed9e9de1544b47c482037ee1d Mon Sep 17 00:00:00 2001 From: Collecting Date: Thu, 8 Jan 2026 07:07:44 +0000 Subject: [PATCH] fix(ui): Improper Overlay Shutdown & Zombie Processes Signed-off-by: Collecting --- src/citron/controller_overlay.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/citron/controller_overlay.cpp b/src/citron/controller_overlay.cpp index d17003f2a..7767191e3 100644 --- a/src/citron/controller_overlay.cpp +++ b/src/citron/controller_overlay.cpp @@ -9,6 +9,7 @@ #include "hid_core/hid_core.h" #include +#include #include #include #include @@ -75,10 +76,19 @@ ControllerOverlay::ControllerOverlay(GMainWindow* parent) } } -ControllerOverlay::~ControllerOverlay() = default; +ControllerOverlay::~ControllerOverlay() { + update_timer.stop(); +} void ControllerOverlay::UpdateControllerState() { - if (!main_window || !is_enabled) return; + // If we're shutting down, kill the timer and hide. + if (QCoreApplication::closingDown() || !main_window || main_window->isHidden()) { + update_timer.stop(); + if (!this->isHidden()) this->hide(); + return; + } + + if (!is_enabled) return; if (UISettings::IsGamescope()) { bool ui_active = false;