2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

software_keyboard: Return correct result code on user cancel operation

This commit is contained in:
Zach Hilman 2018-11-19 15:10:01 -05:00
parent 32775125b7
commit d68795c665
3 changed files with 1 additions and 5 deletions

View file

@ -5,7 +5,6 @@
#include <cstring>
#include "common/assert.h"
#include "core/core.h"
#include "core/frontend/applets/software_keyboard.h"
#include "core/hle/kernel/event.h"
#include "core/hle/kernel/server_port.h"
#include "core/hle/service/am/am.h"

View file

@ -74,7 +74,7 @@ bool SoftwareKeyboard::TransactionComplete() const {
}
ResultCode SoftwareKeyboard::GetStatus() const {
return status;
return RESULT_SUCCESS;
}
void SoftwareKeyboard::ExecuteInteractive() {
@ -118,7 +118,6 @@ void SoftwareKeyboard::WriteText(std::optional<std::u16string> text) {
if (text.has_value()) {
std::vector<u8> output_sub(SWKBD_OUTPUT_BUFFER_SIZE);
status = RESULT_SUCCESS;
if (config.utf_8) {
const u64 size = text->size() + 8;
@ -154,7 +153,6 @@ void SoftwareKeyboard::WriteText(std::optional<std::u16string> text) {
broker->SignalStateChanged();
} else {
status = ResultCode(-1);
output_main[0] = 1;
complete = true;
broker->PushNormalDataFromApplet(IStorage{output_main});

View file

@ -64,7 +64,6 @@ private:
std::u16string initial_text;
bool complete = false;
std::vector<u8> final_data;
ResultCode status = ResultCode(-1);
};
} // namespace Service::AM::Applets