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& registers, const std::array& 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> 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> normal_channel, std::vector> 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> data, std::optional 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 custom_text_main, std::optional 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();