summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2019-06-29 03:02:50 +0200
committerZach Hilman <zachhilman@gmail.com>2019-06-29 03:02:50 +0200
commit554e2f2f983824bee174465c79b9ad3c27e8208f (patch)
tree0ab536c5287b8715928991ccf38c3963b25a564f /src
parentfsp-srv: Implement OutputAccessLogToSdCard (diff)
downloadyuzu-554e2f2f983824bee174465c79b9ad3c27e8208f.tar
yuzu-554e2f2f983824bee174465c79b9ad3c27e8208f.tar.gz
yuzu-554e2f2f983824bee174465c79b9ad3c27e8208f.tar.bz2
yuzu-554e2f2f983824bee174465c79b9ad3c27e8208f.tar.lz
yuzu-554e2f2f983824bee174465c79b9ad3c27e8208f.tar.xz
yuzu-554e2f2f983824bee174465c79b9ad3c27e8208f.tar.zst
yuzu-554e2f2f983824bee174465c79b9ad3c27e8208f.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/reporter.cpp18
-rw-r--r--src/core/reporter.h7
2 files changed, 25 insertions, 0 deletions
diff --git a/src/core/reporter.cpp b/src/core/reporter.cpp
index 774022569..059467318 100644
--- a/src/core/reporter.cpp
+++ b/src/core/reporter.cpp
@@ -335,6 +335,24 @@ void Reporter::SaveErrorReport(u64 title_id, ResultCode result,
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())
return;
diff --git a/src/core/reporter.h b/src/core/reporter.h
index 3de19c0f7..ba95c369e 100644
--- a/src/core/reporter.h
+++ b/src/core/reporter.h
@@ -14,6 +14,10 @@ namespace Kernel {
class HLERequestContext;
} // namespace Kernel
+namespace Service::FileSystem {
+enum class LogMode : u32;
+}
+
namespace Core {
class Reporter {
@@ -45,6 +49,9 @@ public:
std::optional<std::string> custom_text_main = {},
std::optional<std::string> custom_text_detail = {}) const;
+ void SaveFilesystemAccessReport(Service::FileSystem::LogMode log_mode,
+ std::string log_message) const;
+
void SaveUserReport() const;
private: