diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2022-12-19 15:22:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-19 15:22:56 +0100 |
commit | 864c8e4b2fd5954248e759a0f96acefc40625557 (patch) | |
tree | 3d04fe8a06551497c3832bbb0828b8b99735cb5e /src | |
parent | Merge pull request #9470 from german77/silenceIkillYou (diff) | |
parent | overlay_dialog: Avoid starting the input thread if non-interactive (diff) | |
download | yuzu-864c8e4b2fd5954248e759a0f96acefc40625557.tar yuzu-864c8e4b2fd5954248e759a0f96acefc40625557.tar.gz yuzu-864c8e4b2fd5954248e759a0f96acefc40625557.tar.bz2 yuzu-864c8e4b2fd5954248e759a0f96acefc40625557.tar.lz yuzu-864c8e4b2fd5954248e759a0f96acefc40625557.tar.xz yuzu-864c8e4b2fd5954248e759a0f96acefc40625557.tar.zst yuzu-864c8e4b2fd5954248e759a0f96acefc40625557.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/yuzu/util/overlay_dialog.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/yuzu/util/overlay_dialog.cpp b/src/yuzu/util/overlay_dialog.cpp index b27954512..3fa3d0afb 100644 --- a/src/yuzu/util/overlay_dialog.cpp +++ b/src/yuzu/util/overlay_dialog.cpp @@ -42,7 +42,7 @@ OverlayDialog::OverlayDialog(QWidget* parent, Core::System& system, const QStrin MoveAndResizeWindow(); // 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); StartInputThread(); @@ -83,6 +83,11 @@ void OverlayDialog::InitializeRegularTextDialog(const QString& title_text, const ui->button_ok_label->setEnabled(false); } + if (ui->button_cancel->isHidden() && ui->button_ok_label->isHidden()) { + ui->buttonsDialog->hide(); + return; + } + connect( ui->button_cancel, &QPushButton::clicked, this, [this](bool) { @@ -130,6 +135,11 @@ void OverlayDialog::InitializeRichTextDialog(const QString& title_text, const QS ui->button_ok_rich->setEnabled(false); } + if (ui->button_cancel_rich->isHidden() && ui->button_ok_rich->isHidden()) { + ui->buttonsRichDialog->hide(); + return; + } + connect( ui->button_cancel_rich, &QPushButton::clicked, this, [this](bool) { |