mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-17 08:57:56 -05:00
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.
This commit is contained in:
@ -57,7 +57,8 @@ struct UUID {
|
||||
};
|
||||
static_assert(sizeof(UUID) == 16, "UUID is an invalid size!");
|
||||
|
||||
using ProfileUsername = std::array<u8, 0x20>;
|
||||
constexpr std::size_t profile_username_size = 32;
|
||||
using ProfileUsername = std::array<u8, profile_username_size>;
|
||||
using ProfileData = std::array<u8, MAX_DATA>;
|
||||
using UserIDArray = std::array<UUID, MAX_USERS>;
|
||||
|
||||
|
Reference in New Issue
Block a user