diff options
author | Zach Hilman <zachhilman@gmail.com> | 2018-10-10 03:49:29 +0200 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2018-10-24 01:31:28 +0200 |
commit | d3fbf45705e03b992f0ada890cabeac88b86ba3c (patch) | |
tree | e9b4a4579c4431eb2043606654062d980f4f20c4 | |
parent | profile_manager: Load users from emulator settings (diff) | |
download | yuzu-d3fbf45705e03b992f0ada890cabeac88b86ba3c.tar yuzu-d3fbf45705e03b992f0ada890cabeac88b86ba3c.tar.gz yuzu-d3fbf45705e03b992f0ada890cabeac88b86ba3c.tar.bz2 yuzu-d3fbf45705e03b992f0ada890cabeac88b86ba3c.tar.lz yuzu-d3fbf45705e03b992f0ada890cabeac88b86ba3c.tar.xz yuzu-d3fbf45705e03b992f0ada890cabeac88b86ba3c.tar.zst yuzu-d3fbf45705e03b992f0ada890cabeac88b86ba3c.zip |
-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 @@ namespace Service::AM { +constexpr std::size_t POP_LAUNCH_PARAMETER_BUFFER_SIZE = 0x88; + IWindowController::IWindowController() : ServiceFramework("IWindowController") { // clang-format off static const FunctionInfo functions[] = { @@ -724,16 +726,16 @@ void IApplicationFunctions::EndBlockingHomeButton(Kernel::HLERequestContext& ctx } void IApplicationFunctions::PopLaunchParameter(Kernel::HLERequestContext& ctx) { - constexpr std::array<u8, 0x88> data{{ + constexpr std::array<u8, 0x8> header_data{ 0xca, 0x97, 0x94, 0xc7, // Magic 1, 0, 0, 0, // IsAccountSelected (bool) - 1, 0, 0, 0, // User Id (word 0) - 0, 0, 0, 0, // User Id (word 1) - 0, 0, 0, 0, // User Id (word 2) - 0, 0, 0, 0 // User Id (word 3) - }}; + }; + + std::vector<u8> buffer(POP_LAUNCH_PARAMETER_BUFFER_SIZE); - std::vector<u8> buffer(data.begin(), data.end()); + std::memcpy(buffer.data(), header_data.data(), header_data.size()); + const auto current_uuid = Settings::values.users[Settings::values.current_user].second.uuid; + std::memcpy(buffer.data() + header_data.size(), current_uuid.data(), sizeof(u128)); IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |