mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-20 22:05:12 +00:00
Qt: fix user manager localusername and add textvalue to the inputdialog
This commit is contained in:
parent
f84883223b
commit
e29ea61f7c
2 changed files with 11 additions and 3 deletions
|
|
@ -12,12 +12,18 @@ UserAccount::UserAccount(const std::string& user_id)
|
|||
fs::file file;
|
||||
if (file.open(m_user_dir + "localusername", fs::read))
|
||||
{
|
||||
file.read(m_username, 16*sizeof(char)); // max of 16 chars on real PS3
|
||||
m_username = file.to_string();
|
||||
file.close();
|
||||
|
||||
if (m_username.length() > 16) // max of 16 chars on real PS3
|
||||
{
|
||||
m_username = m_username.substr(0, 16);
|
||||
LOG_WARNING(GENERAL, "UserAccount: localusername of userId=%s was too long, cropped to: %s", m_user_id, m_username);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_WARNING(GENERAL, "UserAccount: localusername file read error (userId=%s, userDir=%s).", m_user_id, m_user_dir);
|
||||
LOG_ERROR(GENERAL, "UserAccount: localusername file read error (userId=%s, userDir=%s).", m_user_id, m_user_dir);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue