diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/reporter.cpp | 26 |
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 | |||
| 63 | {"result_description", fmt::format("{:08X}", result.description.Value())}, | 63 | {"result_description", fmt::format("{:08X}", result.description.Value())}, |
| 64 | {"timestamp", timestamp}, | 64 | {"timestamp", timestamp}, |
| 65 | }; | 65 | }; |
| 66 | if (user_id.has_value()) | 66 | |
| 67 | if (user_id.has_value()) { | ||
| 67 | out["user_id"] = fmt::format("{:016X}{:016X}", (*user_id)[1], (*user_id)[0]); | 68 | out["user_id"] = fmt::format("{:016X}{:016X}", (*user_id)[1], (*user_id)[0]); |
| 69 | } | ||
| 70 | |||
| 68 | return out; | 71 | return out; |
| 69 | } | 72 | } |
| 70 | 73 | ||
| @@ -189,8 +192,9 @@ void Reporter::SaveCrashReport(u64 title_id, ResultCode result, u64 set_flags, u | |||
| 189 | const std::array<u64, 31>& registers, | 192 | const std::array<u64, 31>& registers, |
| 190 | const std::array<u64, 32>& backtrace, u32 backtrace_size, | 193 | const std::array<u64, 32>& backtrace, u32 backtrace_size, |
| 191 | const std::string& arch, u32 unk10) const { | 194 | const std::string& arch, u32 unk10) const { |
| 192 | if (!IsReportingEnabled()) | 195 | if (!IsReportingEnabled()) { |
| 193 | return; | 196 | return; |
| 197 | } | ||
| 194 | 198 | ||
| 195 | const auto timestamp = GetTimestamp(); | 199 | const auto timestamp = GetTimestamp(); |
| 196 | json out; | 200 | json out; |
| @@ -214,8 +218,9 @@ void Reporter::SaveCrashReport(u64 title_id, ResultCode result, u64 set_flags, u | |||
| 214 | 218 | ||
| 215 | void Reporter::SaveSvcBreakReport(u32 type, bool signal_debugger, u64 info1, u64 info2, | 219 | void Reporter::SaveSvcBreakReport(u32 type, bool signal_debugger, u64 info1, u64 info2, |
| 216 | std::optional<std::vector<u8>> resolved_buffer) const { | 220 | std::optional<std::vector<u8>> resolved_buffer) const { |
| 217 | if (!IsReportingEnabled()) | 221 | if (!IsReportingEnabled()) { |
| 218 | return; | 222 | return; |
| 223 | } | ||
| 219 | 224 | ||
| 220 | const auto timestamp = GetTimestamp(); | 225 | const auto timestamp = GetTimestamp(); |
| 221 | const auto title_id = system.CurrentProcess()->GetTitleID(); | 226 | const auto title_id = system.CurrentProcess()->GetTitleID(); |
| @@ -240,8 +245,9 @@ void Reporter::SaveSvcBreakReport(u32 type, bool signal_debugger, u64 info1, u64 | |||
| 240 | void Reporter::SaveUnimplementedFunctionReport(Kernel::HLERequestContext& ctx, u32 command_id, | 245 | void Reporter::SaveUnimplementedFunctionReport(Kernel::HLERequestContext& ctx, u32 command_id, |
| 241 | const std::string& name, | 246 | const std::string& name, |
| 242 | const std::string& service_name) const { | 247 | const std::string& service_name) const { |
| 243 | if (!IsReportingEnabled()) | 248 | if (!IsReportingEnabled()) { |
| 244 | return; | 249 | return; |
| 250 | } | ||
| 245 | 251 | ||
| 246 | const auto timestamp = GetTimestamp(); | 252 | const auto timestamp = GetTimestamp(); |
| 247 | const auto title_id = system.CurrentProcess()->GetTitleID(); | 253 | const auto title_id = system.CurrentProcess()->GetTitleID(); |
| @@ -261,8 +267,9 @@ void Reporter::SaveUnimplementedAppletReport( | |||
| 261 | u32 applet_id, u32 common_args_version, u32 library_version, u32 theme_color, | 267 | u32 applet_id, u32 common_args_version, u32 library_version, u32 theme_color, |
| 262 | bool startup_sound, u64 system_tick, std::vector<std::vector<u8>> normal_channel, | 268 | bool startup_sound, u64 system_tick, std::vector<std::vector<u8>> normal_channel, |
| 263 | std::vector<std::vector<u8>> interactive_channel) const { | 269 | std::vector<std::vector<u8>> interactive_channel) const { |
| 264 | if (!IsReportingEnabled()) | 270 | if (!IsReportingEnabled()) { |
| 265 | return; | 271 | return; |
| 272 | } | ||
| 266 | 273 | ||
| 267 | const auto timestamp = GetTimestamp(); | 274 | const auto timestamp = GetTimestamp(); |
| 268 | const auto title_id = system.CurrentProcess()->GetTitleID(); | 275 | const auto title_id = system.CurrentProcess()->GetTitleID(); |
| @@ -295,8 +302,9 @@ void Reporter::SaveUnimplementedAppletReport( | |||
| 295 | 302 | ||
| 296 | void Reporter::SavePlayReport(u64 title_id, u64 process_id, std::vector<std::vector<u8>> data, | 303 | void Reporter::SavePlayReport(u64 title_id, u64 process_id, std::vector<std::vector<u8>> data, |
| 297 | std::optional<u128> user_id) const { | 304 | std::optional<u128> user_id) const { |
| 298 | if (!IsReportingEnabled()) | 305 | if (!IsReportingEnabled()) { |
| 299 | return; | 306 | return; |
| 307 | } | ||
| 300 | 308 | ||
| 301 | const auto timestamp = GetTimestamp(); | 309 | const auto timestamp = GetTimestamp(); |
| 302 | json out; | 310 | json out; |
| @@ -318,8 +326,9 @@ void Reporter::SavePlayReport(u64 title_id, u64 process_id, std::vector<std::vec | |||
| 318 | void Reporter::SaveErrorReport(u64 title_id, ResultCode result, | 326 | void Reporter::SaveErrorReport(u64 title_id, ResultCode result, |
| 319 | std::optional<std::string> custom_text_main, | 327 | std::optional<std::string> custom_text_main, |
| 320 | std::optional<std::string> custom_text_detail) const { | 328 | std::optional<std::string> custom_text_detail) const { |
| 321 | if (!IsReportingEnabled()) | 329 | if (!IsReportingEnabled()) { |
| 322 | return; | 330 | return; |
| 331 | } | ||
| 323 | 332 | ||
| 324 | const auto timestamp = GetTimestamp(); | 333 | const auto timestamp = GetTimestamp(); |
| 325 | json out; | 334 | json out; |
| @@ -338,8 +347,9 @@ void Reporter::SaveErrorReport(u64 title_id, ResultCode result, | |||
| 338 | } | 347 | } |
| 339 | 348 | ||
| 340 | void Reporter::SaveUserReport() const { | 349 | void Reporter::SaveUserReport() const { |
| 341 | if (!IsReportingEnabled()) | 350 | if (!IsReportingEnabled()) { |
| 342 | return; | 351 | return; |
| 352 | } | ||
| 343 | 353 | ||
| 344 | const auto timestamp = GetTimestamp(); | 354 | const auto timestamp = GetTimestamp(); |
| 345 | const auto title_id = system.CurrentProcess()->GetTitleID(); | 355 | const auto title_id = system.CurrentProcess()->GetTitleID(); |