diff options
author | David Marcec <dmarcecguzman@gmail.com> | 2020-04-29 13:09:53 +0200 |
---|---|---|
committer | David Marcec <dmarcecguzman@gmail.com> | 2020-04-29 13:09:53 +0200 |
commit | 1417849a2b3689b46a8969f0ba2a0382ddefb8d1 (patch) | |
tree | 8a3d92e8e1d34ff1ab68dc772c9dff6061e31bf8 | |
parent | Merge pull request #3771 from benru/dump-romfs-with-updates (diff) | |
download | yuzu-1417849a2b3689b46a8969f0ba2a0382ddefb8d1.tar yuzu-1417849a2b3689b46a8969f0ba2a0382ddefb8d1.tar.gz yuzu-1417849a2b3689b46a8969f0ba2a0382ddefb8d1.tar.bz2 yuzu-1417849a2b3689b46a8969f0ba2a0382ddefb8d1.tar.lz yuzu-1417849a2b3689b46a8969f0ba2a0382ddefb8d1.tar.xz yuzu-1417849a2b3689b46a8969f0ba2a0382ddefb8d1.tar.zst yuzu-1417849a2b3689b46a8969f0ba2a0382ddefb8d1.zip |
-rw-r--r-- | src/common/uuid.h | 5 | ||||
-rw-r--r-- | src/core/hle/service/acc/acc.cpp | 13 |
2 files changed, 13 insertions, 5 deletions
diff --git a/src/common/uuid.h b/src/common/uuid.h index f6ad064fb..4d3af8cec 100644 --- a/src/common/uuid.h +++ b/src/common/uuid.h @@ -40,6 +40,11 @@ struct UUID { uuid = INVALID_UUID; } + // TODO(ogniK): Properly generate a Nintendo ID + constexpr u64 GetNintendoID() const { + return uuid[0]; + } + std::string Format() const; std::string FormatSwitch() const; }; 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<IManagerForApplication> { 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<u64>(1); + rb.PushRaw<u64>(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<IManagerForApplication>(); + rb.PushIpcInterface<IManagerForApplication>(profile_manager->GetLastOpenedUser()); } void Module::Interface::IsUserAccountSwitchLocked(Kernel::HLERequestContext& ctx) { |