summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Marcec <dmarcecguzman@gmail.com>2018-08-11 02:33:11 +0200
committerDavid Marcec <dmarcecguzman@gmail.com>2018-08-11 02:33:11 +0200
commit2a3b335b156552515e28f62df2617d06c241a29a (patch)
tree6b77c702ee96370477c83f10ad341f24175a7bf1
parentDon't add user if the uuid already exists (diff)
downloadyuzu-2a3b335b156552515e28f62df2617d06c241a29a.tar
yuzu-2a3b335b156552515e28f62df2617d06c241a29a.tar.gz
yuzu-2a3b335b156552515e28f62df2617d06c241a29a.tar.bz2
yuzu-2a3b335b156552515e28f62df2617d06c241a29a.tar.lz
yuzu-2a3b335b156552515e28f62df2617d06c241a29a.tar.xz
yuzu-2a3b335b156552515e28f62df2617d06c241a29a.tar.zst
yuzu-2a3b335b156552515e28f62df2617d06c241a29a.zip
-rw-r--r--src/core/hle/service/acc/acc.cpp7
-rw-r--r--src/core/hle/service/acc/acc.h1
-rw-r--r--src/core/hle/service/acc/acc_su.cpp2
-rw-r--r--src/core/hle/service/acc/acc_u0.cpp2
-rw-r--r--src/core/hle/service/acc/acc_u1.cpp2
-rw-r--r--src/core/hle/service/acc/profile_manager.cpp6
-rw-r--r--src/core/hle/service/acc/profile_manager.h2
7 files changed, 19 insertions, 3 deletions
diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp
index 7c62d99f6..0a6cac5b7 100644
--- a/src/core/hle/service/acc/acc.cpp
+++ b/src/core/hle/service/acc/acc.cpp
@@ -156,6 +156,13 @@ void Module::Interface::GetProfile(Kernel::HLERequestContext& ctx) {
LOG_DEBUG(Service_ACC, "called user_id={}", user_id.Format());
}
+void Module::Interface::IsUserRegistrationRequestPermitted(Kernel::HLERequestContext& ctx) {
+ LOG_WARNING(Service_ACC, "(STUBBED) called");
+ IPC::ResponseBuilder rb{ctx, 3};
+ rb.Push(RESULT_SUCCESS);
+ rb.Push(profile_manager->CanSystemRegisterUser());
+}
+
void Module::Interface::InitializeApplicationInfo(Kernel::HLERequestContext& ctx) {
LOG_WARNING(Service_ACC, "(STUBBED) called");
IPC::ResponseBuilder rb{ctx, 2};
diff --git a/src/core/hle/service/acc/acc.h b/src/core/hle/service/acc/acc.h
index a9bea77ce..89d92c1c7 100644
--- a/src/core/hle/service/acc/acc.h
+++ b/src/core/hle/service/acc/acc.h
@@ -23,6 +23,7 @@ public:
void GetProfile(Kernel::HLERequestContext& ctx);
void InitializeApplicationInfo(Kernel::HLERequestContext& ctx);
void GetBaasAccountManagerForApplication(Kernel::HLERequestContext& ctx);
+ void IsUserRegistrationRequestPermitted(Kernel::HLERequestContext& ctx);
private:
std::unique_ptr<ProfileManager> profile_manager{};
diff --git a/src/core/hle/service/acc/acc_su.cpp b/src/core/hle/service/acc/acc_su.cpp
index 8b2a71f37..5973768be 100644
--- a/src/core/hle/service/acc/acc_su.cpp
+++ b/src/core/hle/service/acc/acc_su.cpp
@@ -15,7 +15,7 @@ ACC_SU::ACC_SU(std::shared_ptr<Module> module) : Module::Interface(std::move(mod
{4, &ACC_SU::GetLastOpenedUser, "GetLastOpenedUser"},
{5, &ACC_SU::GetProfile, "GetProfile"},
{6, nullptr, "GetProfileDigest"},
- {50, nullptr, "IsUserRegistrationRequestPermitted"},
+ {50, &ACC_SU::IsUserRegistrationRequestPermitted, "IsUserRegistrationRequestPermitted"},
{51, nullptr, "TrySelectUserWithoutInteraction"},
{60, nullptr, "ListOpenContextStoredUsers"},
{100, nullptr, "GetUserRegistrationNotifier"},
diff --git a/src/core/hle/service/acc/acc_u0.cpp b/src/core/hle/service/acc/acc_u0.cpp
index d84c8b2e1..b6fe45dd8 100644
--- a/src/core/hle/service/acc/acc_u0.cpp
+++ b/src/core/hle/service/acc/acc_u0.cpp
@@ -15,7 +15,7 @@ ACC_U0::ACC_U0(std::shared_ptr<Module> module) : Module::Interface(std::move(mod
{4, &ACC_U0::GetLastOpenedUser, "GetLastOpenedUser"},
{5, &ACC_U0::GetProfile, "GetProfile"},
{6, nullptr, "GetProfileDigest"},
- {50, nullptr, "IsUserRegistrationRequestPermitted"},
+ {50, &ACC_U0::IsUserRegistrationRequestPermitted, "IsUserRegistrationRequestPermitted"},
{51, nullptr, "TrySelectUserWithoutInteraction"},
{60, nullptr, "ListOpenContextStoredUsers"},
{100, &ACC_U0::InitializeApplicationInfo, "InitializeApplicationInfo"},
diff --git a/src/core/hle/service/acc/acc_u1.cpp b/src/core/hle/service/acc/acc_u1.cpp
index 0ceaf06b5..99e3f1ef6 100644
--- a/src/core/hle/service/acc/acc_u1.cpp
+++ b/src/core/hle/service/acc/acc_u1.cpp
@@ -15,7 +15,7 @@ ACC_U1::ACC_U1(std::shared_ptr<Module> module) : Module::Interface(std::move(mod
{4, &ACC_U1::GetLastOpenedUser, "GetLastOpenedUser"},
{5, &ACC_U1::GetProfile, "GetProfile"},
{6, nullptr, "GetProfileDigest"},
- {50, nullptr, "IsUserRegistrationRequestPermitted"},
+ {50, &ACC_U1::IsUserRegistrationRequestPermitted, "IsUserRegistrationRequestPermitted"},
{51, nullptr, "TrySelectUserWithoutInteraction"},
{60, nullptr, "ListOpenContextStoredUsers"},
{100, nullptr, "GetUserRegistrationNotifier"},
diff --git a/src/core/hle/service/acc/profile_manager.cpp b/src/core/hle/service/acc/profile_manager.cpp
index ff2b71cce..8e7d7194c 100644
--- a/src/core/hle/service/acc/profile_manager.cpp
+++ b/src/core/hle/service/acc/profile_manager.cpp
@@ -166,4 +166,10 @@ bool ProfileManager::GetProfileBaseAndData(ProfileInfo user, ProfileBase& profil
return GetProfileBaseAndData(user.user_uuid, profile, data);
}
+bool ProfileManager::CanSystemRegisterUser() {
+ return false; // TODO(ogniK): Games shouldn't have
+ // access to user registration, when we
+ // emulate qlaunch. Update this to dynamically change.
+}
+
}; // namespace Service::Account
diff --git a/src/core/hle/service/acc/profile_manager.h b/src/core/hle/service/acc/profile_manager.h
index 130041994..64371ea16 100644
--- a/src/core/hle/service/acc/profile_manager.h
+++ b/src/core/hle/service/acc/profile_manager.h
@@ -97,6 +97,8 @@ public:
std::array<UUID, MAX_USERS> GetAllUsers();
const UUID& GetLastOpennedUser();
+ bool CanSystemRegisterUser();
+
private:
std::array<ProfileInfo, MAX_USERS> profiles{};
size_t user_count = 0;