summaryrefslogtreecommitdiff
path: root/src/core/hle
diff options
context:
space:
mode:
authorGravatar Morph2021-11-08 13:05:50 -0500
committerGravatar Morph2021-11-08 13:05:50 -0500
commit1af499c15b35ee0cd7a90262d91feb874bed55db (patch)
tree71f1af22ca33f8c7c51706c2fc72c8f2f89744b1 /src/core/hle
parentservice/pctl: Stub EndFreeCommunication (diff)
downloadyuzu-1af499c15b35ee0cd7a90262d91feb874bed55db.tar.gz
yuzu-1af499c15b35ee0cd7a90262d91feb874bed55db.tar.xz
yuzu-1af499c15b35ee0cd7a90262d91feb874bed55db.zip
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
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/service/am/applets/applet_software_keyboard.cpp20
-rw-r--r--src/core/hle/service/am/applets/applet_software_keyboard.h3
2 files changed, 15 insertions, 8 deletions
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() {
109 ShowNormalKeyboard(); 109 ShowNormalKeyboard();
110} 110}
111 111
112void SoftwareKeyboard::SubmitTextNormal(SwkbdResult result, std::u16string submitted_text) { 112void SoftwareKeyboard::SubmitTextNormal(SwkbdResult result, std::u16string submitted_text,
113 bool confirmed) {
113 if (complete) { 114 if (complete) {
114 return; 115 return;
115 } 116 }
116 117
117 if (swkbd_config_common.use_text_check && result == SwkbdResult::Ok) { 118 if (swkbd_config_common.use_text_check && result == SwkbdResult::Ok) {
118 SubmitForTextCheck(submitted_text); 119 if (confirmed) {
120 SubmitNormalOutputAndExit(result, submitted_text);
121 } else {
122 SubmitForTextCheck(submitted_text);
123 }
119 } else { 124 } else {
120 SubmitNormalOutputAndExit(result, submitted_text); 125 SubmitNormalOutputAndExit(result, submitted_text);
121 } 126 }
@@ -583,11 +588,12 @@ void SoftwareKeyboard::InitializeFrontendKeyboard() {
583 .disable_cancel_button{disable_cancel_button}, 588 .disable_cancel_button{disable_cancel_button},
584 }; 589 };
585 590
586 frontend.InitializeKeyboard(false, std::move(initialize_parameters), 591 frontend.InitializeKeyboard(
587 [this](SwkbdResult result, std::u16string submitted_text) { 592 false, std::move(initialize_parameters),
588 SubmitTextNormal(result, submitted_text); 593 [this](SwkbdResult result, std::u16string submitted_text, bool confirmed) {
589 }, 594 SubmitTextNormal(result, submitted_text, confirmed);
590 {}); 595 },
596 {});
591 } 597 }
592} 598}
593 599
diff --git a/src/core/hle/service/am/applets/applet_software_keyboard.h b/src/core/hle/service/am/applets/applet_software_keyboard.h
index 6009c10c7..a0fddd965 100644
--- a/src/core/hle/service/am/applets/applet_software_keyboard.h
+++ b/src/core/hle/service/am/applets/applet_software_keyboard.h
@@ -36,8 +36,9 @@ public:
36 * 36 *
37 * @param result SwkbdResult enum 37 * @param result SwkbdResult enum
38 * @param submitted_text UTF-16 encoded string 38 * @param submitted_text UTF-16 encoded string
39 * @param confirmed Whether the text has been confirmed after TextCheckResult::Confirm
39 */ 40 */
40 void SubmitTextNormal(SwkbdResult result, std::u16string submitted_text); 41 void SubmitTextNormal(SwkbdResult result, std::u16string submitted_text, bool confirmed);
41 42
42 /** 43 /**
43 * Submits the input text to the application. 44 * Submits the input text to the application.