summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar David Marcec2018-08-11 10:33:11 +1000
committerGravatar David Marcec2018-08-11 10:33:11 +1000
commit2a3b335b156552515e28f62df2617d06c241a29a (patch)
tree6b77c702ee96370477c83f10ad341f24175a7bf1 /src
parentDon't add user if the uuid already exists (diff)
downloadyuzu-2a3b335b156552515e28f62df2617d06c241a29a.tar.gz
yuzu-2a3b335b156552515e28f62df2617d06c241a29a.tar.xz
yuzu-2a3b335b156552515e28f62df2617d06c241a29a.zip
Added IsUserRegistrationRequestPermitted
Diffstat (limited to 'src')
-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) {
156 LOG_DEBUG(Service_ACC, "called user_id={}", user_id.Format()); 156 LOG_DEBUG(Service_ACC, "called user_id={}", user_id.Format());
157} 157}
158 158
159void Module::Interface::IsUserRegistrationRequestPermitted(Kernel::HLERequestContext& ctx) {
160 LOG_WARNING(Service_ACC, "(STUBBED) called");
161 IPC::ResponseBuilder rb{ctx, 3};
162 rb.Push(RESULT_SUCCESS);
163 rb.Push(profile_manager->CanSystemRegisterUser());
164}
165
159void Module::Interface::InitializeApplicationInfo(Kernel::HLERequestContext& ctx) { 166void Module::Interface::InitializeApplicationInfo(Kernel::HLERequestContext& ctx) {
160 LOG_WARNING(Service_ACC, "(STUBBED) called"); 167 LOG_WARNING(Service_ACC, "(STUBBED) called");
161 IPC::ResponseBuilder rb{ctx, 2}; 168 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:
23 void GetProfile(Kernel::HLERequestContext& ctx); 23 void GetProfile(Kernel::HLERequestContext& ctx);
24 void InitializeApplicationInfo(Kernel::HLERequestContext& ctx); 24 void InitializeApplicationInfo(Kernel::HLERequestContext& ctx);
25 void GetBaasAccountManagerForApplication(Kernel::HLERequestContext& ctx); 25 void GetBaasAccountManagerForApplication(Kernel::HLERequestContext& ctx);
26 void IsUserRegistrationRequestPermitted(Kernel::HLERequestContext& ctx);
26 27
27 private: 28 private:
28 std::unique_ptr<ProfileManager> profile_manager{}; 29 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
15 {4, &ACC_SU::GetLastOpenedUser, "GetLastOpenedUser"}, 15 {4, &ACC_SU::GetLastOpenedUser, "GetLastOpenedUser"},
16 {5, &ACC_SU::GetProfile, "GetProfile"}, 16 {5, &ACC_SU::GetProfile, "GetProfile"},
17 {6, nullptr, "GetProfileDigest"}, 17 {6, nullptr, "GetProfileDigest"},
18 {50, nullptr, "IsUserRegistrationRequestPermitted"}, 18 {50, &ACC_SU::IsUserRegistrationRequestPermitted, "IsUserRegistrationRequestPermitted"},
19 {51, nullptr, "TrySelectUserWithoutInteraction"}, 19 {51, nullptr, "TrySelectUserWithoutInteraction"},
20 {60, nullptr, "ListOpenContextStoredUsers"}, 20 {60, nullptr, "ListOpenContextStoredUsers"},
21 {100, nullptr, "GetUserRegistrationNotifier"}, 21 {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
15 {4, &ACC_U0::GetLastOpenedUser, "GetLastOpenedUser"}, 15 {4, &ACC_U0::GetLastOpenedUser, "GetLastOpenedUser"},
16 {5, &ACC_U0::GetProfile, "GetProfile"}, 16 {5, &ACC_U0::GetProfile, "GetProfile"},
17 {6, nullptr, "GetProfileDigest"}, 17 {6, nullptr, "GetProfileDigest"},
18 {50, nullptr, "IsUserRegistrationRequestPermitted"}, 18 {50, &ACC_U0::IsUserRegistrationRequestPermitted, "IsUserRegistrationRequestPermitted"},
19 {51, nullptr, "TrySelectUserWithoutInteraction"}, 19 {51, nullptr, "TrySelectUserWithoutInteraction"},
20 {60, nullptr, "ListOpenContextStoredUsers"}, 20 {60, nullptr, "ListOpenContextStoredUsers"},
21 {100, &ACC_U0::InitializeApplicationInfo, "InitializeApplicationInfo"}, 21 {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
15 {4, &ACC_U1::GetLastOpenedUser, "GetLastOpenedUser"}, 15 {4, &ACC_U1::GetLastOpenedUser, "GetLastOpenedUser"},
16 {5, &ACC_U1::GetProfile, "GetProfile"}, 16 {5, &ACC_U1::GetProfile, "GetProfile"},
17 {6, nullptr, "GetProfileDigest"}, 17 {6, nullptr, "GetProfileDigest"},
18 {50, nullptr, "IsUserRegistrationRequestPermitted"}, 18 {50, &ACC_U1::IsUserRegistrationRequestPermitted, "IsUserRegistrationRequestPermitted"},
19 {51, nullptr, "TrySelectUserWithoutInteraction"}, 19 {51, nullptr, "TrySelectUserWithoutInteraction"},
20 {60, nullptr, "ListOpenContextStoredUsers"}, 20 {60, nullptr, "ListOpenContextStoredUsers"},
21 {100, nullptr, "GetUserRegistrationNotifier"}, 21 {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
166 return GetProfileBaseAndData(user.user_uuid, profile, data); 166 return GetProfileBaseAndData(user.user_uuid, profile, data);
167} 167}
168 168
169bool ProfileManager::CanSystemRegisterUser() {
170 return false; // TODO(ogniK): Games shouldn't have
171 // access to user registration, when we
172 // emulate qlaunch. Update this to dynamically change.
173}
174
169}; // namespace Service::Account 175}; // 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:
97 std::array<UUID, MAX_USERS> GetAllUsers(); 97 std::array<UUID, MAX_USERS> GetAllUsers();
98 const UUID& GetLastOpennedUser(); 98 const UUID& GetLastOpennedUser();
99 99
100 bool CanSystemRegisterUser();
101
100private: 102private:
101 std::array<ProfileInfo, MAX_USERS> profiles{}; 103 std::array<ProfileInfo, MAX_USERS> profiles{};
102 size_t user_count = 0; 104 size_t user_count = 0;