applet: controller: Implement cancel button

This commit is contained in:
german77 2023-03-26 21:26:28 -06:00
parent 8bdc51b620
commit 11edba4974
9 changed files with 33 additions and 19 deletions

View file

@ -634,15 +634,16 @@ void GMainWindow::ControllerSelectorReconfigureControllers(
Qt::WindowStaysOnTopHint | Qt::WindowTitleHint |
Qt::WindowSystemMenuHint);
controller_applet->setWindowModality(Qt::WindowModal);
controller_applet->exec();
emit ControllerSelectorReconfigureFinished();
bool is_success = controller_applet->exec() != QDialog::Rejected;
// Don't forget to apply settings.
system->HIDCore().DisableAllControllerConfiguration();
system->ApplySettings();
config->Save();
UpdateStatusButtons();
emit ControllerSelectorReconfigureFinished(is_success);
}
void GMainWindow::ControllerSelectorRequestExit() {