diff options
| author | rdenno <rhysdenno@gmail.com> | 2026-10-31 16:10:43 -0400 |
|---|---|---|
| committer | rdenno <rhysdenno@gmail.com> | 2026-10-31 16:11:27 -0400 |
| commit | bb881e290dc014ed171e15b7108d5378b3464c5c (patch) | |
| tree | 8ca23c3655ac8ea9e71d7ecab6303e6a60a73b97 /src | |
| parent | dee08ca5afb80793fbe967b5a330f738f8bc41a3 (diff) | |
am: software keyboard config revision 0x140010 (Switch 2) uses UTF-8 text
Pokopia's name entry got only the first letter: the result went out as UTF-16 and the game reads
UTF-8 (its text check replies are UTF-8 too).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/am/frontend/applet_software_keyboard.cpp | 9 | ||||
| -rw-r--r-- | src/core/hle/service/am/frontend/applet_software_keyboard_types.h | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/core/hle/service/am/frontend/applet_software_keyboard.cpp b/src/core/hle/service/am/frontend/applet_software_keyboard.cpp index fe07d72912..db42781e18 100644 --- a/src/core/hle/service/am/frontend/applet_software_keyboard.cpp +++ b/src/core/hle/service/am/frontend/applet_software_keyboard.cpp @@ -213,6 +213,15 @@ void SoftwareKeyboard::InitializeForeground() { std::memcpy(&swkbd_config_new, swkbd_config_data.data() + sizeof(SwkbdConfigCommon), sizeof(SwkbdConfigNew)); break; + case SwkbdAppletVersion::Version1310736: + // The common and 8.0.0 parts keep their layout; the 0x68 bytes after them are unknown. + // This revision exchanges UTF-8 text: the game's text check replies are UTF-8, and a + // UTF-16 result reached it as its first character only. + ASSERT(swkbd_config_data.size() >= sizeof(SwkbdConfigCommon) + sizeof(SwkbdConfigNew)); + std::memcpy(&swkbd_config_new, swkbd_config_data.data() + sizeof(SwkbdConfigCommon), + sizeof(SwkbdConfigNew)); + swkbd_config_common.use_utf8 = true; + break; default: UNIMPLEMENTED_MSG("Unknown SwkbdConfig revision={} with size={}", swkbd_applet_version, swkbd_config_data.size()); diff --git a/src/core/hle/service/am/frontend/applet_software_keyboard_types.h b/src/core/hle/service/am/frontend/applet_software_keyboard_types.h index 6bb8f437d3..f263a704cd 100644 --- a/src/core/hle/service/am/frontend/applet_software_keyboard_types.h +++ b/src/core/hle/service/am/frontend/applet_software_keyboard_types.h @@ -30,6 +30,7 @@ enum class SwkbdAppletVersion : u32_le { Version327689 = 0x50009, // 5.0.0 - 5.1.0 Version393227 = 0x6000B, // 6.0.0 - 7.0.1 Version524301 = 0x8000D, // 8.0.0+ + Version1310736 = 0x140010, // Switch 2 (Pokemon Pokopia): 0x530-byte config, UTF-8 text }; enum class SwkbdType : u32 { |
