summaryrefslogtreecommitdiffstats
path: root/src/yuzu/applets/qt_controller.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/yuzu/applets/qt_controller.cpp')
-rw-r--r--src/yuzu/applets/qt_controller.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/yuzu/applets/qt_controller.cpp b/src/yuzu/applets/qt_controller.cpp
index c30b54499..79018a7f6 100644
--- a/src/yuzu/applets/qt_controller.cpp
+++ b/src/yuzu/applets/qt_controller.cpp
@@ -678,12 +678,19 @@ void QtControllerSelectorDialog::DisableUnsupportedPlayers() {
QtControllerSelector::QtControllerSelector(GMainWindow& parent) {
connect(this, &QtControllerSelector::MainWindowReconfigureControllers, &parent,
&GMainWindow::ControllerSelectorReconfigureControllers, Qt::QueuedConnection);
+ connect(this, &QtControllerSelector::MainWindowRequestExit, &parent,
+ &GMainWindow::ControllerSelectorRequestExit, Qt::QueuedConnection);
connect(&parent, &GMainWindow::ControllerSelectorReconfigureFinished, this,
&QtControllerSelector::MainWindowReconfigureFinished, Qt::QueuedConnection);
}
QtControllerSelector::~QtControllerSelector() = default;
+void QtControllerSelector::Close() const {
+ callback = {};
+ emit MainWindowRequestExit();
+}
+
void QtControllerSelector::ReconfigureControllers(
ReconfigureCallback callback_, const Core::Frontend::ControllerParameters& parameters) const {
callback = std::move(callback_);
@@ -691,5 +698,7 @@ void QtControllerSelector::ReconfigureControllers(
}
void QtControllerSelector::MainWindowReconfigureFinished() {
- callback();
+ if (callback) {
+ callback();
+ }
}