summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common/hex_util.h2
-rw-r--r--src/core/hle/service/am/applets/applet_software_keyboard.cpp6
-rw-r--r--src/yuzu_cmd/config.cpp3
3 files changed, 8 insertions, 3 deletions
diff --git a/src/common/hex_util.h b/src/common/hex_util.h
index f5f9e4507..5e9b6ef8b 100644
--- a/src/common/hex_util.h
+++ b/src/common/hex_util.h
@@ -61,7 +61,7 @@ template <typename ContiguousContainer>
61 return out; 61 return out;
62} 62}
63 63
64[[nodiscard]] constexpr std::array<u8, 16> AsArray(const char (&data)[17]) { 64[[nodiscard]] constexpr std::array<u8, 16> AsArray(const char (&data)[33]) {
65 return HexStringToArray<16>(data); 65 return HexStringToArray<16>(data);
66} 66}
67 67
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 673abb755..c89aa1bbf 100644
--- a/src/core/hle/service/am/applets/applet_software_keyboard.cpp
+++ b/src/core/hle/service/am/applets/applet_software_keyboard.cpp
@@ -377,7 +377,8 @@ void SoftwareKeyboard::SubmitForTextCheck(std::u16string submitted_text) {
377 377
378 if (swkbd_config_common.use_utf8) { 378 if (swkbd_config_common.use_utf8) {
379 std::string utf8_submitted_text = Common::UTF16ToUTF8(current_text); 379 std::string utf8_submitted_text = Common::UTF16ToUTF8(current_text);
380 const u64 buffer_size = utf8_submitted_text.size(); 380 // Include the null terminator in the buffer size.
381 const u64 buffer_size = utf8_submitted_text.size() + 1;
381 382
382 LOG_DEBUG(Service_AM, "\nBuffer Size: {}\nUTF-8 Submitted Text: {}", buffer_size, 383 LOG_DEBUG(Service_AM, "\nBuffer Size: {}\nUTF-8 Submitted Text: {}", buffer_size,
383 utf8_submitted_text); 384 utf8_submitted_text);
@@ -386,7 +387,8 @@ void SoftwareKeyboard::SubmitForTextCheck(std::u16string submitted_text) {
386 std::memcpy(out_data.data() + sizeof(u64), utf8_submitted_text.data(), 387 std::memcpy(out_data.data() + sizeof(u64), utf8_submitted_text.data(),
387 utf8_submitted_text.size()); 388 utf8_submitted_text.size());
388 } else { 389 } else {
389 const u64 buffer_size = current_text.size() * sizeof(char16_t); 390 // Include the null terminator in the buffer size.
391 const u64 buffer_size = (current_text.size() + 1) * sizeof(char16_t);
390 392
391 LOG_DEBUG(Service_AM, "\nBuffer Size: {}\nUTF-16 Submitted Text: {}", buffer_size, 393 LOG_DEBUG(Service_AM, "\nBuffer Size: {}\nUTF-16 Submitted Text: {}", buffer_size,
392 Common::UTF16ToUTF8(current_text)); 394 Common::UTF16ToUTF8(current_text));
diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp
index 064ecaafa..4f14be524 100644
--- a/src/yuzu_cmd/config.cpp
+++ b/src/yuzu_cmd/config.cpp
@@ -278,6 +278,9 @@ void Config::ReadValues() {
278 if (Settings::values.players.GetValue()[p].analogs[i].empty()) 278 if (Settings::values.players.GetValue()[p].analogs[i].empty())
279 Settings::values.players.GetValue()[p].analogs[i] = default_param; 279 Settings::values.players.GetValue()[p].analogs[i] = default_param;
280 } 280 }
281
282 Settings::values.players.GetValue()[p].connected =
283 sdl2_config->GetBoolean(group, "connected", false);
281 } 284 }
282 285
283 ReadSetting("ControlsGeneral", Settings::values.mouse_enabled); 286 ReadSetting("ControlsGeneral", Settings::values.mouse_enabled);