summaryrefslogtreecommitdiff
path: root/src/core/hle
diff options
context:
space:
mode:
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.