diff options
author | bunnei <bunneidev@gmail.com> | 2020-02-07 22:25:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-07 22:25:42 +0100 |
commit | aa3f9b960697da4a62a9e9987bc2a0db6a1ce5a8 (patch) | |
tree | 2d78c77be18d85f3c74be438fcef877cf55b5a1a /src/core/hle/service | |
parent | Merge pull request #3362 from ReinUsesLisp/fix-instanced (diff) | |
parent | services: prepo: Fix IPC interface with SaveReport/SaveReportWithUser. (diff) | |
download | yuzu-aa3f9b960697da4a62a9e9987bc2a0db6a1ce5a8.tar yuzu-aa3f9b960697da4a62a9e9987bc2a0db6a1ce5a8.tar.gz yuzu-aa3f9b960697da4a62a9e9987bc2a0db6a1ce5a8.tar.bz2 yuzu-aa3f9b960697da4a62a9e9987bc2a0db6a1ce5a8.tar.lz yuzu-aa3f9b960697da4a62a9e9987bc2a0db6a1ce5a8.tar.xz yuzu-aa3f9b960697da4a62a9e9987bc2a0db6a1ce5a8.tar.zst yuzu-aa3f9b960697da4a62a9e9987bc2a0db6a1ce5a8.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/prepo/prepo.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/core/hle/service/prepo/prepo.cpp b/src/core/hle/service/prepo/prepo.cpp index 5eb26caf8..8f1be0e48 100644 --- a/src/core/hle/service/prepo/prepo.cpp +++ b/src/core/hle/service/prepo/prepo.cpp @@ -50,16 +50,16 @@ private: IPC::RequestParser rp{ctx}; const auto process_id = rp.PopRaw<u64>(); - const auto data1 = ctx.ReadBuffer(0); - const auto data2 = ctx.ReadBuffer(1); + std::vector<std::vector<u8>> data{ctx.ReadBuffer(0)}; + if (Type == Core::Reporter::PlayReportType::New) { + data.emplace_back(ctx.ReadBuffer(1)); + } - LOG_DEBUG(Service_PREPO, - "called, type={:02X}, process_id={:016X}, data1_size={:016X}, data2_size={:016X}", - static_cast<u8>(Type), process_id, data1.size(), data2.size()); + LOG_DEBUG(Service_PREPO, "called, type={:02X}, process_id={:016X}, data1_size={:016X}", + static_cast<u8>(Type), process_id, data[0].size()); const auto& reporter{system.GetReporter()}; - reporter.SavePlayReport(Type, system.CurrentProcess()->GetTitleID(), {data1, data2}, - process_id); + reporter.SavePlayReport(Type, system.CurrentProcess()->GetTitleID(), data, process_id); IPC::ResponseBuilder rb{ctx, 2}; rb.Push(RESULT_SUCCESS); @@ -70,19 +70,19 @@ private: IPC::RequestParser rp{ctx}; const auto user_id = rp.PopRaw<u128>(); const auto process_id = rp.PopRaw<u64>(); - - const auto data1 = ctx.ReadBuffer(0); - const auto data2 = ctx.ReadBuffer(1); + std::vector<std::vector<u8>> data{ctx.ReadBuffer(0)}; + if (Type == Core::Reporter::PlayReportType::New) { + data.emplace_back(ctx.ReadBuffer(1)); + } LOG_DEBUG( Service_PREPO, - "called, type={:02X}, user_id={:016X}{:016X}, process_id={:016X}, data1_size={:016X}, " - "data2_size={:016X}", - static_cast<u8>(Type), user_id[1], user_id[0], process_id, data1.size(), data2.size()); + "called, type={:02X}, user_id={:016X}{:016X}, process_id={:016X}, data1_size={:016X}", + static_cast<u8>(Type), user_id[1], user_id[0], process_id, data[0].size()); const auto& reporter{system.GetReporter()}; - reporter.SavePlayReport(Type, system.CurrentProcess()->GetTitleID(), {data1, data2}, - process_id, user_id); + reporter.SavePlayReport(Type, system.CurrentProcess()->GetTitleID(), data, process_id, + user_id); IPC::ResponseBuilder rb{ctx, 2}; rb.Push(RESULT_SUCCESS); |