forked from suyu/suyu
overlay_dialog: Avoid starting the input thread if non-interactive
This commit is contained in:
parent
190ded7f48
commit
690a4c9438
1 changed files with 3 additions and 1 deletions
|
@ -42,7 +42,7 @@ OverlayDialog::OverlayDialog(QWidget* parent, Core::System& system, const QStrin
|
||||||
MoveAndResizeWindow();
|
MoveAndResizeWindow();
|
||||||
|
|
||||||
// TODO (Morph): Remove this when InputInterpreter no longer relies on the HID backend
|
// TODO (Morph): Remove this when InputInterpreter no longer relies on the HID backend
|
||||||
if (system.IsPoweredOn()) {
|
if (system.IsPoweredOn() && !ui->buttonsDialog->isHidden()) {
|
||||||
input_interpreter = std::make_unique<InputInterpreter>(system);
|
input_interpreter = std::make_unique<InputInterpreter>(system);
|
||||||
|
|
||||||
StartInputThread();
|
StartInputThread();
|
||||||
|
@ -85,6 +85,7 @@ void OverlayDialog::InitializeRegularTextDialog(const QString& title_text, const
|
||||||
|
|
||||||
if (ui->button_cancel->isHidden() && ui->button_ok_label->isHidden()) {
|
if (ui->button_cancel->isHidden() && ui->button_ok_label->isHidden()) {
|
||||||
ui->buttonsDialog->hide();
|
ui->buttonsDialog->hide();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
connect(
|
connect(
|
||||||
|
@ -136,6 +137,7 @@ void OverlayDialog::InitializeRichTextDialog(const QString& title_text, const QS
|
||||||
|
|
||||||
if (ui->button_cancel_rich->isHidden() && ui->button_ok_rich->isHidden()) {
|
if (ui->button_cancel_rich->isHidden() && ui->button_ok_rich->isHidden()) {
|
||||||
ui->buttonsRichDialog->hide();
|
ui->buttonsRichDialog->hide();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
connect(
|
connect(
|
||||||
|
|
Loading…
Reference in a new issue