summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2021-05-18 14:20:05 +0200
committerMorph <39850852+Morph1984@users.noreply.github.com>2021-05-19 06:26:32 +0200
commit5396593b55946284f3f5d9d776d5417f1ba79151 (patch)
treec2ce04fee5b98a3deb588244f8e27a51e5ebf702
parentMerge pull request #6317 from ameerj/fps-fix (diff)
downloadyuzu-5396593b55946284f3f5d9d776d5417f1ba79151.tar
yuzu-5396593b55946284f3f5d9d776d5417f1ba79151.tar.gz
yuzu-5396593b55946284f3f5d9d776d5417f1ba79151.tar.bz2
yuzu-5396593b55946284f3f5d9d776d5417f1ba79151.tar.lz
yuzu-5396593b55946284f3f5d9d776d5417f1ba79151.tar.xz
yuzu-5396593b55946284f3f5d9d776d5417f1ba79151.tar.zst
yuzu-5396593b55946284f3f5d9d776d5417f1ba79151.zip
-rw-r--r--src/yuzu/applets/software_keyboard.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/yuzu/applets/software_keyboard.cpp b/src/yuzu/applets/software_keyboard.cpp
index 653486493..b0f764994 100644
--- a/src/yuzu/applets/software_keyboard.cpp
+++ b/src/yuzu/applets/software_keyboard.cpp
@@ -404,12 +404,16 @@ void QtSoftwareKeyboardDialog::ShowTextCheckDialog(
OverlayDialog dialog(this, system, QString{}, QString::fromStdU16String(text_check_message),
tr("Cancel"), tr("OK"), Qt::AlignCenter);
- if (dialog.exec() == QDialog::Accepted) {
- emit SubmitNormalText(SwkbdResult::Ok, current_text);
+ if (dialog.exec() != QDialog::Accepted) {
+ StartInputThread();
break;
}
- StartInputThread();
+ auto text = ui->topOSK->currentIndex() == 1
+ ? ui->text_edit_osk->toPlainText().toStdU16String()
+ : ui->line_edit_osk->text().toStdU16String();
+
+ emit SubmitNormalText(SwkbdResult::Ok, std::move(text));
break;
}
}
@@ -480,11 +484,7 @@ void QtSoftwareKeyboardDialog::open() {
void QtSoftwareKeyboardDialog::reject() {
// Pressing the ESC key in a dialog calls QDialog::reject().
// We will override this behavior to the "Cancel" action on the software keyboard.
- if (is_inline) {
- emit SubmitInlineText(SwkbdReplyType::DecidedCancel, current_text, cursor_position);
- } else {
- emit SubmitNormalText(SwkbdResult::Cancel, current_text);
- }
+ TranslateButtonPress(HIDButton::X);
}
void QtSoftwareKeyboardDialog::keyPressEvent(QKeyEvent* event) {