summaryrefslogtreecommitdiff
path: root/src/core/hle
diff options
context:
space:
mode:
authorGravatar Lioncash2018-10-28 18:11:17 -0400
committerGravatar Lioncash2018-10-31 02:05:00 -0400
commita6830e61b885bb181cbf2f8add82fdd980221002 (patch)
tree2d0331eabb6bfc3fda0d2a4dbbcf1b9d1784a5e6 /src/core/hle
parentMerge pull request #1607 from FearlessTobi/patch-3 (diff)
downloadyuzu-a6830e61b885bb181cbf2f8add82fdd980221002.tar.gz
yuzu-a6830e61b885bb181cbf2f8add82fdd980221002.tar.xz
yuzu-a6830e61b885bb181cbf2f8add82fdd980221002.zip
configure_system: Contrain profile usernames to 32 characters
Previously, we would let a user enter an unbounded name and then silently truncate away characters that went over the 32-character limit. This is kind of bad from the UX point of view, because we're essentially not doing what the user intended in certain scenarios. Instead, we clamp it to 32 characters and make that visually apparent in the dialog box to provide a name for a user.
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/service/acc/profile_manager.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/hle/service/acc/profile_manager.h b/src/core/hle/service/acc/profile_manager.h
index 1cd2e51b2..747c46c20 100644
--- a/src/core/hle/service/acc/profile_manager.h
+++ b/src/core/hle/service/acc/profile_manager.h
@@ -57,7 +57,8 @@ struct UUID {
57}; 57};
58static_assert(sizeof(UUID) == 16, "UUID is an invalid size!"); 58static_assert(sizeof(UUID) == 16, "UUID is an invalid size!");
59 59
60using ProfileUsername = std::array<u8, 0x20>; 60constexpr std::size_t profile_username_size = 32;
61using ProfileUsername = std::array<u8, profile_username_size>;
61using ProfileData = std::array<u8, MAX_DATA>; 62using ProfileData = std::array<u8, MAX_DATA>;
62using UserIDArray = std::array<UUID, MAX_USERS>; 63using UserIDArray = std::array<UUID, MAX_USERS>;
63 64