From 1af499c15b35ee0cd7a90262d91feb874bed55db Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Mon, 8 Nov 2021 13:05:50 -0500 Subject: 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 --- .../service/am/applets/applet_software_keyboard.cpp | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'src/core/hle/service/am/applets/applet_software_keyboard.cpp') diff --git a/src/core/hle/service/am/applets/applet_software_keyboard.cpp b/src/core/hle/service/am/applets/applet_software_keyboard.cpp index c89aa1bbf..1f21cee91 100644 --- a/src/core/hle/service/am/applets/applet_software_keyboard.cpp +++ b/src/core/hle/service/am/applets/applet_software_keyboard.cpp @@ -109,13 +109,18 @@ void SoftwareKeyboard::Execute() { ShowNormalKeyboard(); } -void SoftwareKeyboard::SubmitTextNormal(SwkbdResult result, std::u16string submitted_text) { +void SoftwareKeyboard::SubmitTextNormal(SwkbdResult result, std::u16string submitted_text, + bool confirmed) { if (complete) { return; } if (swkbd_config_common.use_text_check && result == SwkbdResult::Ok) { - SubmitForTextCheck(submitted_text); + if (confirmed) { + SubmitNormalOutputAndExit(result, submitted_text); + } else { + SubmitForTextCheck(submitted_text); + } } else { SubmitNormalOutputAndExit(result, submitted_text); } @@ -583,11 +588,12 @@ void SoftwareKeyboard::InitializeFrontendKeyboard() { .disable_cancel_button{disable_cancel_button}, }; - frontend.InitializeKeyboard(false, std::move(initialize_parameters), - [this](SwkbdResult result, std::u16string submitted_text) { - SubmitTextNormal(result, submitted_text); - }, - {}); + frontend.InitializeKeyboard( + false, std::move(initialize_parameters), + [this](SwkbdResult result, std::u16string submitted_text, bool confirmed) { + SubmitTextNormal(result, submitted_text, confirmed); + }, + {}); } } -- cgit v1.2.3