mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-27 07:38:52 -05:00
qt: implement RequestExit for applets
This commit is contained in:
@ -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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user