summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Zach Hilman2019-07-03 07:57:41 -0500
committerGravatar Zach Hilman2019-07-03 07:57:41 -0500
commit471b2a42117851aec46467a4b6b59ce6f5f6f421 (patch)
tree9fb35d086973b6f697035ba5aca3e89b80e31e99 /src/core
parentacc: Implement IProfileEditor-specific commands 'Store' and 'StoreWithImage' (diff)
downloadyuzu-471b2a42117851aec46467a4b6b59ce6f5f6f421.tar.gz
yuzu-471b2a42117851aec46467a4b6b59ce6f5f6f421.tar.xz
yuzu-471b2a42117851aec46467a4b6b59ce6f5f6f421.zip
acc_su: Implement GetProfileEditor (205)
Takes a UUID of a user and provides and interface that allows RW access to user data/settings.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hle/service/acc/acc.cpp11
-rw-r--r--src/core/hle/service/acc/acc.h1
-rw-r--r--src/core/hle/service/acc/acc_su.cpp2
3 files changed, 13 insertions, 1 deletions
diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp
index 0b9d1df1c..002efaa7a 100644
--- a/src/core/hle/service/acc/acc.cpp
+++ b/src/core/hle/service/acc/acc.cpp
@@ -350,6 +350,17 @@ void Module::Interface::IsUserAccountSwitchLocked(Kernel::HLERequestContext& ctx
350 rb.Push(is_locked); 350 rb.Push(is_locked);
351} 351}
352 352
353void Module::Interface::GetProfileEditor(Kernel::HLERequestContext& ctx) {
354 IPC::RequestParser rp{ctx};
355 Common::UUID user_id = rp.PopRaw<Common::UUID>();
356
357 LOG_DEBUG(Service_ACC, "called, user_id={}", user_id.Format());
358
359 IPC::ResponseBuilder rb{ctx, 2, 0, 1};
360 rb.Push(RESULT_SUCCESS);
361 rb.PushIpcInterface<IProfileEditor>(user_id, *profile_manager);
362}
363
353void Module::Interface::TrySelectUserWithoutInteraction(Kernel::HLERequestContext& ctx) { 364void Module::Interface::TrySelectUserWithoutInteraction(Kernel::HLERequestContext& ctx) {
354 LOG_DEBUG(Service_ACC, "called"); 365 LOG_DEBUG(Service_ACC, "called");
355 // A u8 is passed into this function which we can safely ignore. It's to determine if we have 366 // A u8 is passed into this function which we can safely ignore. It's to determine if we have
diff --git a/src/core/hle/service/acc/acc.h b/src/core/hle/service/acc/acc.h
index 350f123a0..69e4f34fc 100644
--- a/src/core/hle/service/acc/acc.h
+++ b/src/core/hle/service/acc/acc.h
@@ -30,6 +30,7 @@ public:
30 void IsUserRegistrationRequestPermitted(Kernel::HLERequestContext& ctx); 30 void IsUserRegistrationRequestPermitted(Kernel::HLERequestContext& ctx);
31 void TrySelectUserWithoutInteraction(Kernel::HLERequestContext& ctx); 31 void TrySelectUserWithoutInteraction(Kernel::HLERequestContext& ctx);
32 void IsUserAccountSwitchLocked(Kernel::HLERequestContext& ctx); 32 void IsUserAccountSwitchLocked(Kernel::HLERequestContext& ctx);
33 void GetProfileEditor(Kernel::HLERequestContext& ctx);
33 34
34 protected: 35 protected:
35 std::shared_ptr<Module> module; 36 std::shared_ptr<Module> module;
diff --git a/src/core/hle/service/acc/acc_su.cpp b/src/core/hle/service/acc/acc_su.cpp
index 1b7ec3ed0..0d1663657 100644
--- a/src/core/hle/service/acc/acc_su.cpp
+++ b/src/core/hle/service/acc/acc_su.cpp
@@ -41,7 +41,7 @@ ACC_SU::ACC_SU(std::shared_ptr<Module> module, std::shared_ptr<ProfileManager> p
41 {202, nullptr, "CancelUserRegistration"}, 41 {202, nullptr, "CancelUserRegistration"},
42 {203, nullptr, "DeleteUser"}, 42 {203, nullptr, "DeleteUser"},
43 {204, nullptr, "SetUserPosition"}, 43 {204, nullptr, "SetUserPosition"},
44 {205, nullptr, "GetProfileEditor"}, 44 {205, &ACC_SU::GetProfileEditor, "GetProfileEditor"},
45 {206, nullptr, "CompleteUserRegistrationForcibly"}, 45 {206, nullptr, "CompleteUserRegistrationForcibly"},
46 {210, nullptr, "CreateFloatingRegistrationRequest"}, 46 {210, nullptr, "CreateFloatingRegistrationRequest"},
47 {230, nullptr, "AuthenticateServiceAsync"}, 47 {230, nullptr, "AuthenticateServiceAsync"},