summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Zach Hilman2019-05-17 21:49:21 -0400
committerGravatar Zach Hilman2019-05-25 16:09:20 -0400
commitcdf52b9374469a69d04b80753af12da57c3ad57e (patch)
tree477ffc0389b18a157426ffbc34019bf138c2f996 /src/core
parentfatal: Save report on fatal:u call (diff)
downloadyuzu-cdf52b9374469a69d04b80753af12da57c3ad57e.tar.gz
yuzu-cdf52b9374469a69d04b80753af12da57c3ad57e.tar.xz
yuzu-cdf52b9374469a69d04b80753af12da57c3ad57e.zip
prepo: Save reports from PlayReport service
Logs a lot of seemingly innocuous telemetry games generate.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hle/service/prepo/prepo.cpp25
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 @@
2// Licensed under GPLv2 or any later version 2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include <json.hpp>
6#include "common/file_util.h"
7#include "common/hex_util.h"
5#include "common/logging/log.h" 8#include "common/logging/log.h"
9#include "common/scm_rev.h"
6#include "core/hle/ipc_helpers.h" 10#include "core/hle/ipc_helpers.h"
11#include "core/hle/kernel/process.h"
12#include "core/hle/service/acc/profile_manager.h"
7#include "core/hle/service/prepo/prepo.h" 13#include "core/hle/service/prepo/prepo.h"
8#include "core/hle/service/service.h" 14#include "core/hle/service/service.h"
15#include "core/reporter.h"
16#include "core/settings.h"
9 17
10namespace Service::PlayReport { 18namespace Service::PlayReport {
11 19
@@ -40,8 +48,21 @@ public:
40 48
41private: 49private:
42 void SaveReportWithUserOld(Kernel::HLERequestContext& ctx) { 50 void SaveReportWithUserOld(Kernel::HLERequestContext& ctx) {
43 // TODO(ogniK): Do we want to add play report? 51 IPC::RequestParser rp{ctx};
44 LOG_WARNING(Service_PREPO, "(STUBBED) called"); 52 const auto user_id = rp.PopRaw<u128>();
53 const auto unk1 = rp.PopRaw<u64>();
54
55 const auto data1 = ctx.ReadBuffer(0);
56 const auto data2 = ctx.ReadBuffer(1);
57
58 LOG_DEBUG(
59 Service_PREPO,
60 "called, user_id={:016X}{:016X}, unk1={:016X}, data1_size={:016X}, data2_size={:016X}",
61 user_id[1], user_id[0], unk1, data1.size(), data2.size());
62
63 const auto& reporter{Core::System::GetInstance().GetReporter()};
64 reporter.SavePlayReport(Core::CurrentProcess()->GetTitleID(), unk1, {data1, data2},
65 user_id);
45 66
46 IPC::ResponseBuilder rb{ctx, 2}; 67 IPC::ResponseBuilder rb{ctx, 2};
47 rb.Push(RESULT_SUCCESS); 68 rb.Push(RESULT_SUCCESS);