diff options
| -rw-r--r-- | src/yuzu/applets/software_keyboard.cpp | 16 |
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( | |||
| 404 | 404 | ||
| 405 | OverlayDialog dialog(this, system, QString{}, QString::fromStdU16String(text_check_message), | 405 | OverlayDialog dialog(this, system, QString{}, QString::fromStdU16String(text_check_message), |
| 406 | tr("Cancel"), tr("OK"), Qt::AlignCenter); | 406 | tr("Cancel"), tr("OK"), Qt::AlignCenter); |
| 407 | if (dialog.exec() == QDialog::Accepted) { | 407 | if (dialog.exec() != QDialog::Accepted) { |
| 408 | emit SubmitNormalText(SwkbdResult::Ok, current_text); | 408 | StartInputThread(); |
| 409 | break; | 409 | break; |
| 410 | } | 410 | } |
| 411 | 411 | ||
| 412 | StartInputThread(); | 412 | auto text = ui->topOSK->currentIndex() == 1 |
| 413 | ? ui->text_edit_osk->toPlainText().toStdU16String() | ||
| 414 | : ui->line_edit_osk->text().toStdU16String(); | ||
| 415 | |||
| 416 | emit SubmitNormalText(SwkbdResult::Ok, std::move(text)); | ||
| 413 | break; | 417 | break; |
| 414 | } | 418 | } |
| 415 | } | 419 | } |
| @@ -480,11 +484,7 @@ void QtSoftwareKeyboardDialog::open() { | |||
| 480 | void QtSoftwareKeyboardDialog::reject() { | 484 | void QtSoftwareKeyboardDialog::reject() { |
| 481 | // Pressing the ESC key in a dialog calls QDialog::reject(). | 485 | // Pressing the ESC key in a dialog calls QDialog::reject(). |
| 482 | // We will override this behavior to the "Cancel" action on the software keyboard. | 486 | // We will override this behavior to the "Cancel" action on the software keyboard. |
| 483 | if (is_inline) { | 487 | TranslateButtonPress(HIDButton::X); |
| 484 | emit SubmitInlineText(SwkbdReplyType::DecidedCancel, current_text, cursor_position); | ||
| 485 | } else { | ||
| 486 | emit SubmitNormalText(SwkbdResult::Cancel, current_text); | ||
| 487 | } | ||
| 488 | } | 488 | } |
| 489 | 489 | ||
| 490 | void QtSoftwareKeyboardDialog::keyPressEvent(QKeyEvent* event) { | 490 | void QtSoftwareKeyboardDialog::keyPressEvent(QKeyEvent* event) { |