applets/swkbd: Skip text checking if the text has been confirmed

Confirm means that the text has already been checked by the application to be correct, but is asking the user for confirmation.
The confirmation text itself seems to be corrupted though, this needs to be investigated.

Fixes the software keyboard in Famicom Detective Club: The Missing Heir
This commit is contained in:
Morph 2021-11-08 13:05:50 -05:00
parent 22ab930f36
commit ab736f254f
8 changed files with 36 additions and 26 deletions

View file

@ -413,7 +413,7 @@ void QtSoftwareKeyboardDialog::ShowTextCheckDialog(
? ui->text_edit_osk->toPlainText().toStdU16String()
: ui->line_edit_osk->text().toStdU16String();
emit SubmitNormalText(SwkbdResult::Ok, std::move(text));
emit SubmitNormalText(SwkbdResult::Ok, std::move(text), true);
break;
}
}
@ -1510,7 +1510,8 @@ QtSoftwareKeyboard::~QtSoftwareKeyboard() = default;
void QtSoftwareKeyboard::InitializeKeyboard(
bool is_inline, Core::Frontend::KeyboardInitializeParameters initialize_parameters,
std::function<void(Service::AM::Applets::SwkbdResult, std::u16string)> submit_normal_callback_,
std::function<void(Service::AM::Applets::SwkbdResult, std::u16string, bool)>
submit_normal_callback_,
std::function<void(Service::AM::Applets::SwkbdReplyType, std::u16string, s32)>
submit_inline_callback_) {
if (is_inline) {
@ -1609,8 +1610,8 @@ void QtSoftwareKeyboard::ExitKeyboard() const {
}
void QtSoftwareKeyboard::SubmitNormalText(Service::AM::Applets::SwkbdResult result,
std::u16string submitted_text) const {
submit_normal_callback(result, submitted_text);
std::u16string submitted_text, bool confirmed) const {
submit_normal_callback(result, submitted_text, confirmed);
}
void QtSoftwareKeyboard::SubmitInlineText(Service::AM::Applets::SwkbdReplyType reply_type,