Skip to content

VERY experimental Nintendo Switch 2 emulator

C++

Merge pull request #2642 from DarkLordZach/fsp-log-2

bunnei28c3099b5eb4
diff --cc src/core/reporter.cpp
index 6ea26fda72,059467318d..5d4c3e6ead
--- a/src/core/reporter.cpp
+++ b/src/core/reporter.cpp
@@@ -350,10 -335,27 +350,28 @@@ void Reporter::SaveErrorReport(u64 titl
SaveToFile(std::move(out), GetPath("error_report", title_id, timestamp));
}
+ void Reporter::SaveFilesystemAccessReport(Service::FileSystem::LogMode log_mode,
+ std::string log_message) const {
+ if (!IsReportingEnabled())
+ return;
+
+ const auto timestamp = GetTimestamp();
+ const auto title_id = system.CurrentProcess()->GetTitleID();
+ json out;
+
+ out["yuzu_version"] = GetYuzuVersionData();
+ out["report_common"] = GetReportCommonData(title_id, RESULT_SUCCESS, timestamp);
+
+ out["log_mode"] = fmt::format("{:08X}", static_cast<u32>(log_mode));
+ out["log_message"] = std::move(log_message);
+
+ SaveToFile(std::move(out), GetPath("filesystem_access_report", title_id, timestamp));
+ }
+
void Reporter::SaveUserReport() const {
- if (!IsReportingEnabled())
+ if (!IsReportingEnabled()) {
return;
+ }
const auto timestamp = GetTimestamp();
const auto title_id = system.CurrentProcess()->GetTitleID();
diff --cc src/core/reporter.h
index 4266ca5507,ba95c369e4..44256de507
--- a/src/core/reporter.h
+++ b/src/core/reporter.h
@@@ -16,13 -14,15 +16,17 @@@ namespace Kernel
class HLERequestContext;
} // namespace Kernel
+ namespace Service::FileSystem {
+ enum class LogMode : u32;
+ }
+
namespace Core {
+class System;
+
class Reporter {
public:
- explicit Reporter(Core::System& system);
+ explicit Reporter(System& system);
~Reporter();
void SaveCrashReport(u64 title_id, ResultCode result, u64 set_flags, u64 entry_point, u64 sp,