diff options
author | Zach Hilman <zachhilman@gmail.com> | 2019-05-18 03:49:21 +0200 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2019-05-25 22:09:20 +0200 |
commit | cdf52b9374469a69d04b80753af12da57c3ad57e (patch) | |
tree | 477ffc0389b18a157426ffbc34019bf138c2f996 /src/core | |
parent | fatal: Save report on fatal:u call (diff) | |
download | yuzu-cdf52b9374469a69d04b80753af12da57c3ad57e.tar yuzu-cdf52b9374469a69d04b80753af12da57c3ad57e.tar.gz yuzu-cdf52b9374469a69d04b80753af12da57c3ad57e.tar.bz2 yuzu-cdf52b9374469a69d04b80753af12da57c3ad57e.tar.lz yuzu-cdf52b9374469a69d04b80753af12da57c3ad57e.tar.xz yuzu-cdf52b9374469a69d04b80753af12da57c3ad57e.tar.zst yuzu-cdf52b9374469a69d04b80753af12da57c3ad57e.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/hle/service/prepo/prepo.cpp | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/src/core/hle/service/prepo/prepo.cpp b/src/core/hle/service/prepo/prepo.cpp index e4fcee9f8..961b8882d 100644 --- a/src/core/hle/service/prepo/prepo.cpp +++ b/src/core/hle/service/prepo/prepo.cpp @@ -2,10 +2,18 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#include <json.hpp> +#include "common/file_util.h" +#include "common/hex_util.h" #include "common/logging/log.h" +#include "common/scm_rev.h" #include "core/hle/ipc_helpers.h" +#include "core/hle/kernel/process.h" +#include "core/hle/service/acc/profile_manager.h" #include "core/hle/service/prepo/prepo.h" #include "core/hle/service/service.h" +#include "core/reporter.h" +#include "core/settings.h" namespace Service::PlayReport { @@ -40,8 +48,21 @@ public: private: void SaveReportWithUserOld(Kernel::HLERequestContext& ctx) { - // TODO(ogniK): Do we want to add play report? - LOG_WARNING(Service_PREPO, "(STUBBED) called"); + IPC::RequestParser rp{ctx}; + const auto user_id = rp.PopRaw<u128>(); + const auto unk1 = rp.PopRaw<u64>(); + + const auto data1 = ctx.ReadBuffer(0); + const auto data2 = ctx.ReadBuffer(1); + + LOG_DEBUG( + Service_PREPO, + "called, user_id={:016X}{:016X}, unk1={:016X}, data1_size={:016X}, data2_size={:016X}", + user_id[1], user_id[0], unk1, data1.size(), data2.size()); + + const auto& reporter{Core::System::GetInstance().GetReporter()}; + reporter.SavePlayReport(Core::CurrentProcess()->GetTitleID(), unk1, {data1, data2}, + user_id); IPC::ResponseBuilder rb{ctx, 2}; rb.Push(RESULT_SUCCESS); |