diff options
| author | 2018-11-19 15:10:01 -0500 | |
|---|---|---|
| committer | 2018-11-19 15:10:01 -0500 | |
| commit | d68795c665fe73da55f0427d1ff05281d46c3de9 (patch) | |
| tree | 4e6af5284a6d2484c289fd8f5d57464118522b2b /src | |
| parent | applet: Add AppletDataBroker to manage HLE to AM service interaction (diff) | |
| download | yuzu-d68795c665fe73da55f0427d1ff05281d46c3de9.tar.gz yuzu-d68795c665fe73da55f0427d1ff05281d46c3de9.tar.xz yuzu-d68795c665fe73da55f0427d1ff05281d46c3de9.zip | |
software_keyboard: Return correct result code on user cancel operation
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/am/applets/applets.cpp | 1 | ||||
| -rw-r--r-- | src/core/hle/service/am/applets/software_keyboard.cpp | 4 | ||||
| -rw-r--r-- | src/core/hle/service/am/applets/software_keyboard.h | 1 |
3 files changed, 1 insertions, 5 deletions
diff --git a/src/core/hle/service/am/applets/applets.cpp b/src/core/hle/service/am/applets/applets.cpp index c81bd59b2..8adb81823 100644 --- a/src/core/hle/service/am/applets/applets.cpp +++ b/src/core/hle/service/am/applets/applets.cpp | |||
| @@ -5,7 +5,6 @@ | |||
| 5 | #include <cstring> | 5 | #include <cstring> |
| 6 | #include "common/assert.h" | 6 | #include "common/assert.h" |
| 7 | #include "core/core.h" | 7 | #include "core/core.h" |
| 8 | #include "core/frontend/applets/software_keyboard.h" | ||
| 9 | #include "core/hle/kernel/event.h" | 8 | #include "core/hle/kernel/event.h" |
| 10 | #include "core/hle/kernel/server_port.h" | 9 | #include "core/hle/kernel/server_port.h" |
| 11 | #include "core/hle/service/am/am.h" | 10 | #include "core/hle/service/am/am.h" |
diff --git a/src/core/hle/service/am/applets/software_keyboard.cpp b/src/core/hle/service/am/applets/software_keyboard.cpp index ca9ef7e7d..aec6bf2a7 100644 --- a/src/core/hle/service/am/applets/software_keyboard.cpp +++ b/src/core/hle/service/am/applets/software_keyboard.cpp | |||
| @@ -74,7 +74,7 @@ bool SoftwareKeyboard::TransactionComplete() const { | |||
| 74 | } | 74 | } |
| 75 | 75 | ||
| 76 | ResultCode SoftwareKeyboard::GetStatus() const { | 76 | ResultCode SoftwareKeyboard::GetStatus() const { |
| 77 | return status; | 77 | return RESULT_SUCCESS; |
| 78 | } | 78 | } |
| 79 | 79 | ||
| 80 | void SoftwareKeyboard::ExecuteInteractive() { | 80 | void SoftwareKeyboard::ExecuteInteractive() { |
| @@ -118,7 +118,6 @@ void SoftwareKeyboard::WriteText(std::optional<std::u16string> text) { | |||
| 118 | 118 | ||
| 119 | if (text.has_value()) { | 119 | if (text.has_value()) { |
| 120 | std::vector<u8> output_sub(SWKBD_OUTPUT_BUFFER_SIZE); | 120 | std::vector<u8> output_sub(SWKBD_OUTPUT_BUFFER_SIZE); |
| 121 | status = RESULT_SUCCESS; | ||
| 122 | 121 | ||
| 123 | if (config.utf_8) { | 122 | if (config.utf_8) { |
| 124 | const u64 size = text->size() + 8; | 123 | const u64 size = text->size() + 8; |
| @@ -154,7 +153,6 @@ void SoftwareKeyboard::WriteText(std::optional<std::u16string> text) { | |||
| 154 | 153 | ||
| 155 | broker->SignalStateChanged(); | 154 | broker->SignalStateChanged(); |
| 156 | } else { | 155 | } else { |
| 157 | status = ResultCode(-1); | ||
| 158 | output_main[0] = 1; | 156 | output_main[0] = 1; |
| 159 | complete = true; | 157 | complete = true; |
| 160 | broker->PushNormalDataFromApplet(IStorage{output_main}); | 158 | broker->PushNormalDataFromApplet(IStorage{output_main}); |
diff --git a/src/core/hle/service/am/applets/software_keyboard.h b/src/core/hle/service/am/applets/software_keyboard.h index 405c58851..16e1fff66 100644 --- a/src/core/hle/service/am/applets/software_keyboard.h +++ b/src/core/hle/service/am/applets/software_keyboard.h | |||
| @@ -64,7 +64,6 @@ private: | |||
| 64 | std::u16string initial_text; | 64 | std::u16string initial_text; |
| 65 | bool complete = false; | 65 | bool complete = false; |
| 66 | std::vector<u8> final_data; | 66 | std::vector<u8> final_data; |
| 67 | ResultCode status = ResultCode(-1); | ||
| 68 | }; | 67 | }; |
| 69 | 68 | ||
| 70 | } // namespace Service::AM::Applets | 69 | } // namespace Service::AM::Applets |