summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/acc/acc.cpp
diff options
context:
space:
mode:
authorDavid Marcec <dmarcecguzman@gmail.com>2018-08-08 14:26:42 +0200
committerDavid Marcec <dmarcecguzman@gmail.com>2018-08-08 14:26:42 +0200
commit6f691e71bfa30de8789327a969cb7c2fdd1669f2 (patch)
treec48798f2d3fdde5b0ff5ab2dc6d2a4f6fdc9b5c8 /src/core/hle/service/acc/acc.cpp
parentSwitched uuids from u128 to new UUID struct (diff)
downloadyuzu-6f691e71bfa30de8789327a969cb7c2fdd1669f2.tar
yuzu-6f691e71bfa30de8789327a969cb7c2fdd1669f2.tar.gz
yuzu-6f691e71bfa30de8789327a969cb7c2fdd1669f2.tar.bz2
yuzu-6f691e71bfa30de8789327a969cb7c2fdd1669f2.tar.lz
yuzu-6f691e71bfa30de8789327a969cb7c2fdd1669f2.tar.xz
yuzu-6f691e71bfa30de8789327a969cb7c2fdd1669f2.tar.zst
yuzu-6f691e71bfa30de8789327a969cb7c2fdd1669f2.zip
Diffstat (limited to 'src/core/hle/service/acc/acc.cpp')
-rw-r--r--src/core/hle/service/acc/acc.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp
index 1fb3d96f6..8efaf6171 100644
--- a/src/core/hle/service/acc/acc.cpp
+++ b/src/core/hle/service/acc/acc.cpp
@@ -28,7 +28,7 @@ struct UserData {
static_assert(sizeof(UserData) == 0x80, "UserData structure has incorrect size");
struct ProfileBase {
- u128 user_id;
+ UUID user_id;
u64 timestamp;
std::array<u8, 0x20> username;
};
@@ -53,7 +53,7 @@ private:
void Get(Kernel::HLERequestContext& ctx) {
LOG_WARNING(Service_ACC, "(STUBBED) called");
ProfileBase profile_base{};
- profile_base.user_id = user_id.uuid;
+ profile_base.user_id = user_id;
if (Settings::values.username.size() > profile_base.username.size()) {
std::copy_n(Settings::values.username.begin(), profile_base.username.size(),
profile_base.username.begin());
@@ -72,7 +72,7 @@ private:
// TODO(Subv): Retrieve this information from somewhere.
ProfileBase profile_base{};
- profile_base.user_id = user_id.uuid;
+ profile_base.user_id = user_id;
if (Settings::values.username.size() > profile_base.username.size()) {
std::copy_n(Settings::values.username.begin(), profile_base.username.size(),
profile_base.username.begin());
@@ -122,17 +122,20 @@ private:
};
void Module::Interface::GetUserCount(Kernel::HLERequestContext& ctx) {
- LOG_WARNING(Service_ACC, "(STUBBED) called");
+ LOG_INFO(Service_ACC, "called");
IPC::ResponseBuilder rb{ctx, 3};
rb.Push(RESULT_SUCCESS);
- rb.Push<u32>(1);
+ rb.Push<u32>(static_cast<u32>(profile_manager->GetUserCount()));
}
void Module::Interface::GetUserExistence(Kernel::HLERequestContext& ctx) {
- LOG_WARNING(Service_ACC, "(STUBBED) called");
+ IPC::RequestParser rp{ctx};
+ UUID user_id = rp.PopRaw<UUID>();
+ LOG_INFO(Service_ACC, "called user_id={}", user_id.Format());
+
IPC::ResponseBuilder rb{ctx, 3};
rb.Push(RESULT_SUCCESS);
- rb.Push(true); // TODO: Check when this is supposed to return true and when not
+ rb.Push(profile_manager->UserExists(user_id));
}
void Module::Interface::ListAllUsers(Kernel::HLERequestContext& ctx) {