rpcsx/rpcs3/rpcs3qt/user_account.cpp
Megamouse eef900ef41 user-manager: megamouse fixes
(cherry picked from commit 949807c1cc689e12e5f0cea367564306ea36a759)
2018-07-26 03:16:51 +04:00

27 lines
560 B
C++

#include "user_account.h"
UserAccount::UserAccount(const std::string& user_id)
{
// Setting userId.
m_user_id = user_id;
// Setting userDir.
m_user_dir = Emu.GetHddDir() + "home/" + m_user_id + "/";
// Setting userName.
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
file.close();
}
else
{
LOG_WARNING(GENERAL, "UserAccount: localusername file read error (userId=%s, userDir=%s).", m_user_id, m_user_dir);
}
}
UserAccount::~UserAccount()
{
}