mirror of
https://git.eden-emu.dev/archive/citron
synced 2026-04-15 09:10:46 -04:00
fix(ui): Improper Overlay Shutdown & Zombie Processes
Signed-off-by: Collecting <collecting@noreply.localhost>
This commit is contained in:
@@ -9,6 +9,7 @@
|
|||||||
#include "hid_core/hid_core.h"
|
#include "hid_core/hid_core.h"
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
#include <QCoreApplication>
|
||||||
#include <QGridLayout>
|
#include <QGridLayout>
|
||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
@@ -75,10 +76,19 @@ ControllerOverlay::ControllerOverlay(GMainWindow* parent)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ControllerOverlay::~ControllerOverlay() = default;
|
ControllerOverlay::~ControllerOverlay() {
|
||||||
|
update_timer.stop();
|
||||||
|
}
|
||||||
|
|
||||||
void ControllerOverlay::UpdateControllerState() {
|
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()) {
|
if (UISettings::IsGamescope()) {
|
||||||
bool ui_active = false;
|
bool ui_active = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user