diff options
| author | 2018-10-09 21:49:29 -0400 | |
|---|---|---|
| committer | 2018-10-23 19:31:28 -0400 | |
| commit | d3fbf45705e03b992f0ada890cabeac88b86ba3c (patch) | |
| tree | e9b4a4579c4431eb2043606654062d980f4f20c4 /src | |
| parent | profile_manager: Load users from emulator settings (diff) | |
| download | yuzu-d3fbf45705e03b992f0ada890cabeac88b86ba3c.tar.gz yuzu-d3fbf45705e03b992f0ada890cabeac88b86ba3c.tar.xz yuzu-d3fbf45705e03b992f0ada890cabeac88b86ba3c.zip | |
am: Pass current user UUID to launch parameters
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/am/am.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index ecf72ae24..2dc647ec8 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp | |||
| @@ -26,6 +26,8 @@ | |||
| 26 | 26 | ||
| 27 | namespace Service::AM { | 27 | namespace Service::AM { |
| 28 | 28 | ||
| 29 | constexpr std::size_t POP_LAUNCH_PARAMETER_BUFFER_SIZE = 0x88; | ||
| 30 | |||
| 29 | IWindowController::IWindowController() : ServiceFramework("IWindowController") { | 31 | IWindowController::IWindowController() : ServiceFramework("IWindowController") { |
| 30 | // clang-format off | 32 | // clang-format off |
| 31 | static const FunctionInfo functions[] = { | 33 | static const FunctionInfo functions[] = { |
| @@ -724,16 +726,16 @@ void IApplicationFunctions::EndBlockingHomeButton(Kernel::HLERequestContext& ctx | |||
| 724 | } | 726 | } |
| 725 | 727 | ||
| 726 | void IApplicationFunctions::PopLaunchParameter(Kernel::HLERequestContext& ctx) { | 728 | void IApplicationFunctions::PopLaunchParameter(Kernel::HLERequestContext& ctx) { |
| 727 | constexpr std::array<u8, 0x88> data{{ | 729 | constexpr std::array<u8, 0x8> header_data{ |
| 728 | 0xca, 0x97, 0x94, 0xc7, // Magic | 730 | 0xca, 0x97, 0x94, 0xc7, // Magic |
| 729 | 1, 0, 0, 0, // IsAccountSelected (bool) | 731 | 1, 0, 0, 0, // IsAccountSelected (bool) |
| 730 | 1, 0, 0, 0, // User Id (word 0) | 732 | }; |
| 731 | 0, 0, 0, 0, // User Id (word 1) | 733 | |
| 732 | 0, 0, 0, 0, // User Id (word 2) | 734 | std::vector<u8> buffer(POP_LAUNCH_PARAMETER_BUFFER_SIZE); |
| 733 | 0, 0, 0, 0 // User Id (word 3) | ||
| 734 | }}; | ||
| 735 | 735 | ||
| 736 | std::vector<u8> buffer(data.begin(), data.end()); | 736 | std::memcpy(buffer.data(), header_data.data(), header_data.size()); |
| 737 | const auto current_uuid = Settings::values.users[Settings::values.current_user].second.uuid; | ||
| 738 | std::memcpy(buffer.data() + header_data.size(), current_uuid.data(), sizeof(u128)); | ||
| 737 | 739 | ||
| 738 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 740 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 739 | 741 | ||