diff --git a/app/src/main/cpp/skyline/services/account/IProfile.cpp b/app/src/main/cpp/skyline/services/account/IProfile.cpp index 6bfe6f09..3f79bed3 100644 --- a/app/src/main/cpp/skyline/services/account/IProfile.cpp +++ b/app/src/main/cpp/skyline/services/account/IProfile.cpp @@ -6,7 +6,8 @@ namespace skyline::service::account { IProfile::IProfile(const DeviceState &state, ServiceManager &manager, const UserId &userId) : userId(userId), BaseService(state, manager, Service::account_IProfile, "account:IProfile", { - {0x0, SFUNC(IProfile::Get)} + {0x0, SFUNC(IProfile::Get)}, + {0x1, SFUNC(IProfile::GetBase)} }) {} void IProfile::Get(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { @@ -19,6 +20,13 @@ namespace skyline::service::account { u8 _unk2_[0x60]; }; + auto userData = state.process->GetPointer(request.outputBuf.at(0).address); + userData->iconBackgroundColorID = 0x1; // Color indexing starts at 0x1 + + GetBase(session, request, response); + } + + void IProfile::GetBase(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { struct { UserId uid; //!< The UID of the corresponding account u64 lastEditTimestamp; //!< A POSIX UTC timestamp denoting the last account edit @@ -31,9 +39,6 @@ namespace skyline::service::account { size_t usernameSize = std::min(accountProfileBase.nickname.size() - 1, username.size()); std::memcpy(accountProfileBase.nickname.data(), username.c_str(), usernameSize); - auto userData = state.process->GetPointer(request.outputBuf.at(0).address); - userData->iconBackgroundColorID = 0x1; // Color indexing starts at 0x1 - response.Push(accountProfileBase); } } diff --git a/app/src/main/cpp/skyline/services/account/IProfile.h b/app/src/main/cpp/skyline/services/account/IProfile.h index a091ef69..2e89a11e 100644 --- a/app/src/main/cpp/skyline/services/account/IProfile.h +++ b/app/src/main/cpp/skyline/services/account/IProfile.h @@ -22,5 +22,10 @@ namespace skyline::service::account { * @brief This returns AccountUserData and AccountProfileBase objects that describe the user's information */ void Get(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + + /** + * @brief This returns an AccountProfileBase object that describe the user's information + */ + void GetBase(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); }; }