summaryrefslogtreecommitdiff
path: root/src/yuzu/applets/qt_controller.cpp
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-03-29 09:11:34 -0400
committerGitHub <noreply@github.com>2023-03-29 09:11:34 -0400
commit8bdc51b620f0778f53d76ad9368da97a9213d631 (patch)
tree2a71c944643cda0ab019c22d1d46d58552f002ff /src/yuzu/applets/qt_controller.cpp
parent9c96d40586d89fd39b1bc80455542a1e54d10dee (diff)
parent50a59487eb49baa229d553dd9a3c00aef20f799f (diff)
Merge pull request #9505 from liamwhite/request-exit
applets: implement RequestExit
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();
+ }
}