diff options
author | bunnei <bunneidev@gmail.com> | 2018-02-06 05:24:47 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-02-09 00:59:23 +0100 |
commit | dc0a137e5b502329cd130c70bea093852233d1df (patch) | |
tree | 764e95c96db1d2f8577583f57aba0d93f482b4cb /src | |
parent | Merge pull request #169 from bunnei/gpu-mem (diff) | |
download | yuzu-dc0a137e5b502329cd130c70bea093852233d1df.tar yuzu-dc0a137e5b502329cd130c70bea093852233d1df.tar.gz yuzu-dc0a137e5b502329cd130c70bea093852233d1df.tar.bz2 yuzu-dc0a137e5b502329cd130c70bea093852233d1df.tar.lz yuzu-dc0a137e5b502329cd130c70bea093852233d1df.tar.xz yuzu-dc0a137e5b502329cd130c70bea093852233d1df.tar.zst yuzu-dc0a137e5b502329cd130c70bea093852233d1df.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/core/hle/service/acc/acc_u0.cpp | 16 | ||||
-rw-r--r-- | src/core/hle/service/acc/acc_u0.h | 1 |
2 files changed, 15 insertions, 2 deletions
diff --git a/src/core/hle/service/acc/acc_u0.cpp b/src/core/hle/service/acc/acc_u0.cpp index ff9f6cca8..ee7d07aa7 100644 --- a/src/core/hle/service/acc/acc_u0.cpp +++ b/src/core/hle/service/acc/acc_u0.cpp @@ -9,6 +9,9 @@ namespace Service { namespace Account { +using Uid = std::array<u64, 2>; +static constexpr Uid DEFAULT_USER_ID{0x10ull, 0x20ull}; + class IProfile final : public ServiceFramework<IProfile> { public: IProfile() : ServiceFramework("IProfile") { @@ -61,6 +64,15 @@ void ACC_U0::GetUserExistence(Kernel::HLERequestContext& ctx) { rb.Push(true); // TODO: Check when this is supposed to return true and when not } +void ACC_U0::ListAllUsers(Kernel::HLERequestContext& ctx) { + constexpr std::array<u128, 10> user_ids{DEFAULT_USER_ID}; + const auto& output_buffer = ctx.BufferDescriptorC()[0]; + Memory::WriteBlock(output_buffer.Address(), user_ids.data(), user_ids.size()); + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(RESULT_SUCCESS); + LOG_DEBUG(Service_ACC, "called"); +} + void ACC_U0::GetProfile(Kernel::HLERequestContext& ctx) { IPC::ResponseBuilder rb{ctx, 2, 0, 1}; rb.Push(RESULT_SUCCESS); @@ -85,13 +97,13 @@ void ACC_U0::GetLastOpenedUser(Kernel::HLERequestContext& ctx) { LOG_WARNING(Service_ACC, "(STUBBED) called"); IPC::ResponseBuilder rb{ctx, 6}; rb.Push(RESULT_SUCCESS); - rb.Push<u64>(0x0); - rb.Push<u64>(0x0); + rb.PushRaw(DEFAULT_USER_ID); } ACC_U0::ACC_U0() : ServiceFramework("acc:u0") { static const FunctionInfo functions[] = { {1, &ACC_U0::GetUserExistence, "GetUserExistence"}, + {2, &ACC_U0::ListAllUsers, "ListAllUsers"}, {4, &ACC_U0::GetLastOpenedUser, "GetLastOpenedUser"}, {5, &ACC_U0::GetProfile, "GetProfile"}, {100, &ACC_U0::InitializeApplicationInfo, "InitializeApplicationInfo"}, diff --git a/src/core/hle/service/acc/acc_u0.h b/src/core/hle/service/acc/acc_u0.h index b38c2f95e..d7732e75b 100644 --- a/src/core/hle/service/acc/acc_u0.h +++ b/src/core/hle/service/acc/acc_u0.h @@ -28,6 +28,7 @@ public: private: void GetUserExistence(Kernel::HLERequestContext& ctx); + void ListAllUsers(Kernel::HLERequestContext& ctx); void GetLastOpenedUser(Kernel::HLERequestContext& ctx); void GetProfile(Kernel::HLERequestContext& ctx); void InitializeApplicationInfo(Kernel::HLERequestContext& ctx); |