From 1417849a2b3689b46a8969f0ba2a0382ddefb8d1 Mon Sep 17 00:00:00 2001 From: David Marcec Date: Wed, 29 Apr 2020 21:09:53 +1000 Subject: acc: Return a unique value per account for GetAccountId --- src/core/hle/service/acc/acc.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/core/hle') diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp index cfac8ca9a..81ea772a0 100644 --- a/src/core/hle/service/acc/acc.cpp +++ b/src/core/hle/service/acc/acc.cpp @@ -228,7 +228,8 @@ public: class IManagerForApplication final : public ServiceFramework { public: - IManagerForApplication() : ServiceFramework("IManagerForApplication") { + explicit IManagerForApplication(Common::UUID user_id) + : ServiceFramework("IManagerForApplication"), user_id(user_id) { // clang-format off static const FunctionInfo functions[] = { {0, &IManagerForApplication::CheckAvailability, "CheckAvailability"}, @@ -254,12 +255,14 @@ private: } void GetAccountId(Kernel::HLERequestContext& ctx) { - LOG_WARNING(Service_ACC, "(STUBBED) called"); - // Should return a nintendo account ID + LOG_DEBUG(Service_ACC, "called"); + IPC::ResponseBuilder rb{ctx, 4}; rb.Push(RESULT_SUCCESS); - rb.PushRaw(1); + rb.PushRaw(user_id.GetNintendoID()); } + + Common::UUID user_id; }; void Module::Interface::GetUserCount(Kernel::HLERequestContext& ctx) { @@ -389,7 +392,7 @@ void Module::Interface::GetBaasAccountManagerForApplication(Kernel::HLERequestCo LOG_DEBUG(Service_ACC, "called"); IPC::ResponseBuilder rb{ctx, 2, 0, 1}; rb.Push(RESULT_SUCCESS); - rb.PushIpcInterface(); + rb.PushIpcInterface(profile_manager->GetLastOpenedUser()); } void Module::Interface::IsUserAccountSwitchLocked(Kernel::HLERequestContext& ctx) { -- cgit v1.2.3