summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-07-05 23:05:24 +0200
committerLioncash <mathew1800@gmail.com>2019-07-05 23:05:27 +0200
commitf12eb408344b992ac71ded87903510263dc51836 (patch)
tree4fec3960563ccb669bf371b5898a5d78729f9d58
parentcore/reporter: Return in error case in SaveToFile() (diff)
downloadyuzu-f12eb408344b992ac71ded87903510263dc51836.tar
yuzu-f12eb408344b992ac71ded87903510263dc51836.tar.gz
yuzu-f12eb408344b992ac71ded87903510263dc51836.tar.bz2
yuzu-f12eb408344b992ac71ded87903510263dc51836.tar.lz
yuzu-f12eb408344b992ac71ded87903510263dc51836.tar.xz
yuzu-f12eb408344b992ac71ded87903510263dc51836.tar.zst
yuzu-f12eb408344b992ac71ded87903510263dc51836.zip
-rw-r--r--src/core/reporter.cpp26
1 files changed, 18 insertions, 8 deletions
diff --git a/src/core/reporter.cpp b/src/core/reporter.cpp
index 79af28314..be471131f 100644
--- a/src/core/reporter.cpp
+++ b/src/core/reporter.cpp
@@ -63,8 +63,11 @@ json GetReportCommonData(u64 title_id, ResultCode result, const std::string& tim
{"result_description", fmt::format("{:08X}", result.description.Value())},
{"timestamp", timestamp},
};
- if (user_id.has_value())
+
+ if (user_id.has_value()) {
out["user_id"] = fmt::format("{:016X}{:016X}", (*user_id)[1], (*user_id)[0]);
+ }
+
return out;
}
@@ -189,8 +192,9 @@ void Reporter::SaveCrashReport(u64 title_id, ResultCode result, u64 set_flags, u
const std::array<u64, 31>& registers,
const std::array<u64, 32>& backtrace, u32 backtrace_size,
const std::string& arch, u32 unk10) const {
- if (!IsReportingEnabled())
+ if (!IsReportingEnabled()) {
return;
+ }
const auto timestamp = GetTimestamp();
json out;
@@ -214,8 +218,9 @@ void Reporter::SaveCrashReport(u64 title_id, ResultCode result, u64 set_flags, u
void Reporter::SaveSvcBreakReport(u32 type, bool signal_debugger, u64 info1, u64 info2,
std::optional<std::vector<u8>> resolved_buffer) const {
- if (!IsReportingEnabled())
+ if (!IsReportingEnabled()) {
return;
+ }
const auto timestamp = GetTimestamp();
const auto title_id = system.CurrentProcess()->GetTitleID();
@@ -240,8 +245,9 @@ void Reporter::SaveSvcBreakReport(u32 type, bool signal_debugger, u64 info1, u64
void Reporter::SaveUnimplementedFunctionReport(Kernel::HLERequestContext& ctx, u32 command_id,
const std::string& name,
const std::string& service_name) const {
- if (!IsReportingEnabled())
+ if (!IsReportingEnabled()) {
return;
+ }
const auto timestamp = GetTimestamp();
const auto title_id = system.CurrentProcess()->GetTitleID();
@@ -261,8 +267,9 @@ void Reporter::SaveUnimplementedAppletReport(
u32 applet_id, u32 common_args_version, u32 library_version, u32 theme_color,
bool startup_sound, u64 system_tick, std::vector<std::vector<u8>> normal_channel,
std::vector<std::vector<u8>> interactive_channel) const {
- if (!IsReportingEnabled())
+ if (!IsReportingEnabled()) {
return;
+ }
const auto timestamp = GetTimestamp();
const auto title_id = system.CurrentProcess()->GetTitleID();
@@ -295,8 +302,9 @@ void Reporter::SaveUnimplementedAppletReport(
void Reporter::SavePlayReport(u64 title_id, u64 process_id, std::vector<std::vector<u8>> data,
std::optional<u128> user_id) const {
- if (!IsReportingEnabled())
+ if (!IsReportingEnabled()) {
return;
+ }
const auto timestamp = GetTimestamp();
json out;
@@ -318,8 +326,9 @@ void Reporter::SavePlayReport(u64 title_id, u64 process_id, std::vector<std::vec
void Reporter::SaveErrorReport(u64 title_id, ResultCode result,
std::optional<std::string> custom_text_main,
std::optional<std::string> custom_text_detail) const {
- if (!IsReportingEnabled())
+ if (!IsReportingEnabled()) {
return;
+ }
const auto timestamp = GetTimestamp();
json out;
@@ -338,8 +347,9 @@ void Reporter::SaveErrorReport(u64 title_id, ResultCode result,
}
void Reporter::SaveUserReport() const {
- if (!IsReportingEnabled())
+ if (!IsReportingEnabled()) {
return;
+ }
const auto timestamp = GetTimestamp();
const auto title_id = system.CurrentProcess()->GetTitleID();