mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-12-27 06:00:05 +00:00
software_keyboard: Fix erroneous extra PushNormalData
This commit is contained in:
parent
d68795c665
commit
a9fa890f14
@ -127,7 +127,7 @@ void SoftwareKeyboard::WriteText(std::optional<std::u16string> text) {
|
|||||||
std::memcpy(output_sub.data() + 8, new_text.data(),
|
std::memcpy(output_sub.data() + 8, new_text.data(),
|
||||||
std::min(new_text.size(), SWKBD_OUTPUT_BUFFER_SIZE - 8));
|
std::min(new_text.size(), SWKBD_OUTPUT_BUFFER_SIZE - 8));
|
||||||
|
|
||||||
output_main[0] = config.text_check;
|
output_main[0] = INTERACTIVE_STATUS_OK;
|
||||||
std::memcpy(output_main.data() + 4, new_text.data(),
|
std::memcpy(output_main.data() + 4, new_text.data(),
|
||||||
std::min(new_text.size(), SWKBD_OUTPUT_BUFFER_SIZE - 4));
|
std::min(new_text.size(), SWKBD_OUTPUT_BUFFER_SIZE - 4));
|
||||||
} else {
|
} else {
|
||||||
@ -136,7 +136,7 @@ void SoftwareKeyboard::WriteText(std::optional<std::u16string> text) {
|
|||||||
std::memcpy(output_sub.data() + 8, text->data(),
|
std::memcpy(output_sub.data() + 8, text->data(),
|
||||||
std::min(text->size() * 2, SWKBD_OUTPUT_BUFFER_SIZE - 8));
|
std::min(text->size() * 2, SWKBD_OUTPUT_BUFFER_SIZE - 8));
|
||||||
|
|
||||||
output_main[0] = config.text_check;
|
output_main[0] = INTERACTIVE_STATUS_OK;
|
||||||
std::memcpy(output_main.data() + 4, text->data(),
|
std::memcpy(output_main.data() + 4, text->data(),
|
||||||
std::min(text->size() * 2, SWKBD_OUTPUT_BUFFER_SIZE - 4));
|
std::min(text->size() * 2, SWKBD_OUTPUT_BUFFER_SIZE - 4));
|
||||||
}
|
}
|
||||||
@ -147,7 +147,6 @@ void SoftwareKeyboard::WriteText(std::optional<std::u16string> text) {
|
|||||||
if (complete) {
|
if (complete) {
|
||||||
broker->PushNormalDataFromApplet(IStorage{output_main});
|
broker->PushNormalDataFromApplet(IStorage{output_main});
|
||||||
} else {
|
} else {
|
||||||
broker->PushNormalDataFromApplet(IStorage{output_main});
|
|
||||||
broker->PushInteractiveDataFromApplet(IStorage{output_sub});
|
broker->PushInteractiveDataFromApplet(IStorage{output_sub});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user