summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-05-04 05:15:03 +0200
committerGitHub <noreply@github.com>2020-05-04 05:15:03 +0200
commit29fce1a1872909f7200a3b727adcc3dfb71013a1 (patch)
tree66cc98f31a0c4f36f6e77059b943c26d1ac6b984
parentsettings: Add anisotropic filtering level to the yuzu configuration log (#3875) (diff)
parentacc: Return a unique value per account for GetAccountId (diff)
downloadyuzu-29fce1a1872909f7200a3b727adcc3dfb71013a1.tar
yuzu-29fce1a1872909f7200a3b727adcc3dfb71013a1.tar.gz
yuzu-29fce1a1872909f7200a3b727adcc3dfb71013a1.tar.bz2
yuzu-29fce1a1872909f7200a3b727adcc3dfb71013a1.tar.lz
yuzu-29fce1a1872909f7200a3b727adcc3dfb71013a1.tar.xz
yuzu-29fce1a1872909f7200a3b727adcc3dfb71013a1.tar.zst
yuzu-29fce1a1872909f7200a3b727adcc3dfb71013a1.zip
-rw-r--r--src/common/uuid.h5
-rw-r--r--src/core/hle/service/acc/acc.cpp13
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 9a7992f58..630a8b048 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) {
@@ -382,7 +385,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) {