diff options
| author | 2021-06-16 14:03:01 -0400 | |
|---|---|---|
| committer | 2021-06-16 14:03:01 -0400 | |
| commit | 92942fe01bf290d247e1a51562a07fe280448b47 (patch) | |
| tree | 0868b1e5d5ae17a77dc18f678eb454b3e8f16c2b /src | |
| parent | Merge pull request #6462 from Morph1984/proper-flush (diff) | |
| parent | common: fs: file: Remove redundant call to WriteStringToFile (diff) | |
| download | yuzu-92942fe01bf290d247e1a51562a07fe280448b47.tar.gz yuzu-92942fe01bf290d247e1a51562a07fe280448b47.tar.xz yuzu-92942fe01bf290d247e1a51562a07fe280448b47.zip | |
Merge pull request #6460 from Morph1984/fs-access-log-fix
fsp_srv: Fix filesystem access logging
Diffstat (limited to '')
| -rw-r--r-- | src/common/fs/file.cpp | 4 | ||||
| -rw-r--r-- | src/common/fs/file.h | 3 | ||||
| -rw-r--r-- | src/common/settings.h | 1 | ||||
| -rw-r--r-- | src/core/hle/service/filesystem/fsp_srv.cpp | 15 | ||||
| -rw-r--r-- | src/core/hle/service/filesystem/fsp_srv.h | 12 | ||||
| -rw-r--r-- | src/core/reporter.cpp | 36 | ||||
| -rw-r--r-- | src/core/reporter.h | 9 | ||||
| -rw-r--r-- | src/yuzu/configuration/config.cpp | 4 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_debug.cpp | 11 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_debug.ui | 9 | ||||
| -rw-r--r-- | src/yuzu_cmd/config.cpp | 2 | ||||
| -rw-r--r-- | src/yuzu_cmd/default_ini.h | 2 |
12 files changed, 64 insertions, 44 deletions
diff --git a/src/common/fs/file.cpp b/src/common/fs/file.cpp index c84f31f3e..710e88b39 100644 --- a/src/common/fs/file.cpp +++ b/src/common/fs/file.cpp | |||
| @@ -183,10 +183,6 @@ size_t WriteStringToFile(const std::filesystem::path& path, FileType type, | |||
| 183 | 183 | ||
| 184 | size_t AppendStringToFile(const std::filesystem::path& path, FileType type, | 184 | size_t AppendStringToFile(const std::filesystem::path& path, FileType type, |
| 185 | std::string_view string) { | 185 | std::string_view string) { |
| 186 | if (!Exists(path)) { | ||
| 187 | return WriteStringToFile(path, type, string); | ||
| 188 | } | ||
| 189 | |||
| 190 | if (!IsFile(path)) { | 186 | if (!IsFile(path)) { |
| 191 | return 0; | 187 | return 0; |
| 192 | } | 188 | } |
diff --git a/src/common/fs/file.h b/src/common/fs/file.h index 50e270c5b..0f10b6003 100644 --- a/src/common/fs/file.h +++ b/src/common/fs/file.h | |||
| @@ -71,7 +71,7 @@ template <typename Path> | |||
| 71 | 71 | ||
| 72 | /** | 72 | /** |
| 73 | * Writes a string to a file at path and returns the number of characters successfully written. | 73 | * Writes a string to a file at path and returns the number of characters successfully written. |
| 74 | * If an file already exists at path, its contents will be erased. | 74 | * If a file already exists at path, its contents will be erased. |
| 75 | * If the filesystem object at path is not a file, this function returns 0. | 75 | * If the filesystem object at path is not a file, this function returns 0. |
| 76 | * | 76 | * |
| 77 | * @param path Filesystem path | 77 | * @param path Filesystem path |
| @@ -95,7 +95,6 @@ template <typename Path> | |||
| 95 | 95 | ||
| 96 | /** | 96 | /** |
| 97 | * Appends a string to a file at path and returns the number of characters successfully written. | 97 | * Appends a string to a file at path and returns the number of characters successfully written. |
| 98 | * If a file does not exist at path, WriteStringToFile is called instead. | ||
| 99 | * If the filesystem object at path is not a file, this function returns 0. | 98 | * If the filesystem object at path is not a file, this function returns 0. |
| 100 | * | 99 | * |
| 101 | * @param path Filesystem path | 100 | * @param path Filesystem path |
diff --git a/src/common/settings.h b/src/common/settings.h index 1af8c5ac2..bf34f2b5b 100644 --- a/src/common/settings.h +++ b/src/common/settings.h | |||
| @@ -218,6 +218,7 @@ struct Values { | |||
| 218 | std::string program_args; | 218 | std::string program_args; |
| 219 | bool dump_exefs; | 219 | bool dump_exefs; |
| 220 | bool dump_nso; | 220 | bool dump_nso; |
| 221 | bool enable_fs_access_log; | ||
| 221 | bool reporting_services; | 222 | bool reporting_services; |
| 222 | bool quest_flag; | 223 | bool quest_flag; |
| 223 | bool disable_macro_jit; | 224 | bool disable_macro_jit; |
diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp index 3af9881c2..db4d44c12 100644 --- a/src/core/hle/service/filesystem/fsp_srv.cpp +++ b/src/core/hle/service/filesystem/fsp_srv.cpp | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | #include "common/common_types.h" | 13 | #include "common/common_types.h" |
| 14 | #include "common/hex_util.h" | 14 | #include "common/hex_util.h" |
| 15 | #include "common/logging/log.h" | 15 | #include "common/logging/log.h" |
| 16 | #include "common/settings.h" | ||
| 16 | #include "common/string_util.h" | 17 | #include "common/string_util.h" |
| 17 | #include "core/core.h" | 18 | #include "core/core.h" |
| 18 | #include "core/file_sys/directory.h" | 19 | #include "core/file_sys/directory.h" |
| @@ -785,6 +786,10 @@ FSP_SRV::FSP_SRV(Core::System& system_) | |||
| 785 | }; | 786 | }; |
| 786 | // clang-format on | 787 | // clang-format on |
| 787 | RegisterHandlers(functions); | 788 | RegisterHandlers(functions); |
| 789 | |||
| 790 | if (Settings::values.enable_fs_access_log) { | ||
| 791 | access_log_mode = AccessLogMode::SdCard; | ||
| 792 | } | ||
| 788 | } | 793 | } |
| 789 | 794 | ||
| 790 | FSP_SRV::~FSP_SRV() = default; | 795 | FSP_SRV::~FSP_SRV() = default; |
| @@ -1041,9 +1046,9 @@ void FSP_SRV::DisableAutoSaveDataCreation(Kernel::HLERequestContext& ctx) { | |||
| 1041 | 1046 | ||
| 1042 | void FSP_SRV::SetGlobalAccessLogMode(Kernel::HLERequestContext& ctx) { | 1047 | void FSP_SRV::SetGlobalAccessLogMode(Kernel::HLERequestContext& ctx) { |
| 1043 | IPC::RequestParser rp{ctx}; | 1048 | IPC::RequestParser rp{ctx}; |
| 1044 | log_mode = rp.PopEnum<LogMode>(); | 1049 | access_log_mode = rp.PopEnum<AccessLogMode>(); |
| 1045 | 1050 | ||
| 1046 | LOG_DEBUG(Service_FS, "called, log_mode={:08X}", log_mode); | 1051 | LOG_DEBUG(Service_FS, "called, access_log_mode={}", access_log_mode); |
| 1047 | 1052 | ||
| 1048 | IPC::ResponseBuilder rb{ctx, 2}; | 1053 | IPC::ResponseBuilder rb{ctx, 2}; |
| 1049 | rb.Push(ResultSuccess); | 1054 | rb.Push(ResultSuccess); |
| @@ -1054,7 +1059,7 @@ void FSP_SRV::GetGlobalAccessLogMode(Kernel::HLERequestContext& ctx) { | |||
| 1054 | 1059 | ||
| 1055 | IPC::ResponseBuilder rb{ctx, 3}; | 1060 | IPC::ResponseBuilder rb{ctx, 3}; |
| 1056 | rb.Push(ResultSuccess); | 1061 | rb.Push(ResultSuccess); |
| 1057 | rb.PushEnum(log_mode); | 1062 | rb.PushEnum(access_log_mode); |
| 1058 | } | 1063 | } |
| 1059 | 1064 | ||
| 1060 | void FSP_SRV::OutputAccessLogToSdCard(Kernel::HLERequestContext& ctx) { | 1065 | void FSP_SRV::OutputAccessLogToSdCard(Kernel::HLERequestContext& ctx) { |
| @@ -1062,9 +1067,9 @@ void FSP_SRV::OutputAccessLogToSdCard(Kernel::HLERequestContext& ctx) { | |||
| 1062 | auto log = Common::StringFromFixedZeroTerminatedBuffer( | 1067 | auto log = Common::StringFromFixedZeroTerminatedBuffer( |
| 1063 | reinterpret_cast<const char*>(raw.data()), raw.size()); | 1068 | reinterpret_cast<const char*>(raw.data()), raw.size()); |
| 1064 | 1069 | ||
| 1065 | LOG_DEBUG(Service_FS, "called, log='{}'", log); | 1070 | LOG_DEBUG(Service_FS, "called"); |
| 1066 | 1071 | ||
| 1067 | reporter.SaveFilesystemAccessReport(log_mode, std::move(log)); | 1072 | reporter.SaveFSAccessLog(log); |
| 1068 | 1073 | ||
| 1069 | IPC::ResponseBuilder rb{ctx, 2}; | 1074 | IPC::ResponseBuilder rb{ctx, 2}; |
| 1070 | rb.Push(ResultSuccess); | 1075 | rb.Push(ResultSuccess); |
diff --git a/src/core/hle/service/filesystem/fsp_srv.h b/src/core/hle/service/filesystem/fsp_srv.h index ff7455a20..556708284 100644 --- a/src/core/hle/service/filesystem/fsp_srv.h +++ b/src/core/hle/service/filesystem/fsp_srv.h | |||
| @@ -24,11 +24,10 @@ enum class AccessLogVersion : u32 { | |||
| 24 | Latest = V7_0_0, | 24 | Latest = V7_0_0, |
| 25 | }; | 25 | }; |
| 26 | 26 | ||
| 27 | enum class LogMode : u32 { | 27 | enum class AccessLogMode : u32 { |
| 28 | Off, | 28 | None, |
| 29 | Log, | 29 | Log, |
| 30 | RedirectToSdCard, | 30 | SdCard, |
| 31 | LogToSdCard = Log | RedirectToSdCard, | ||
| 32 | }; | 31 | }; |
| 33 | 32 | ||
| 34 | class FSP_SRV final : public ServiceFramework<FSP_SRV> { | 33 | class FSP_SRV final : public ServiceFramework<FSP_SRV> { |
| @@ -59,13 +58,12 @@ private: | |||
| 59 | 58 | ||
| 60 | FileSystemController& fsc; | 59 | FileSystemController& fsc; |
| 61 | const FileSys::ContentProvider& content_provider; | 60 | const FileSys::ContentProvider& content_provider; |
| 61 | const Core::Reporter& reporter; | ||
| 62 | 62 | ||
| 63 | FileSys::VirtualFile romfs; | 63 | FileSys::VirtualFile romfs; |
| 64 | u64 current_process_id = 0; | 64 | u64 current_process_id = 0; |
| 65 | u32 access_log_program_index = 0; | 65 | u32 access_log_program_index = 0; |
| 66 | LogMode log_mode = LogMode::LogToSdCard; | 66 | AccessLogMode access_log_mode = AccessLogMode::None; |
| 67 | |||
| 68 | const Core::Reporter& reporter; | ||
| 69 | }; | 67 | }; |
| 70 | 68 | ||
| 71 | } // namespace Service::FileSystem | 69 | } // namespace Service::FileSystem |
diff --git a/src/core/reporter.cpp b/src/core/reporter.cpp index ec2a16e62..82b0f535a 100644 --- a/src/core/reporter.cpp +++ b/src/core/reporter.cpp | |||
| @@ -195,7 +195,9 @@ json GetHLERequestContextData(Kernel::HLERequestContext& ctx, Core::Memory::Memo | |||
| 195 | 195 | ||
| 196 | namespace Core { | 196 | namespace Core { |
| 197 | 197 | ||
| 198 | Reporter::Reporter(System& system_) : system(system_) {} | 198 | Reporter::Reporter(System& system_) : system(system_) { |
| 199 | ClearFSAccessLog(); | ||
| 200 | } | ||
| 199 | 201 | ||
| 200 | Reporter::~Reporter() = default; | 202 | Reporter::~Reporter() = default; |
| 201 | 203 | ||
| @@ -362,22 +364,12 @@ void Reporter::SaveErrorReport(u64 title_id, ResultCode result, | |||
| 362 | SaveToFile(std::move(out), GetPath("error_report", title_id, timestamp)); | 364 | SaveToFile(std::move(out), GetPath("error_report", title_id, timestamp)); |
| 363 | } | 365 | } |
| 364 | 366 | ||
| 365 | void Reporter::SaveFilesystemAccessReport(Service::FileSystem::LogMode log_mode, | 367 | void Reporter::SaveFSAccessLog(std::string_view log_message) const { |
| 366 | std::string log_message) const { | 368 | const auto access_log_path = |
| 367 | if (!IsReportingEnabled()) | 369 | Common::FS::GetYuzuPath(Common::FS::YuzuPath::SDMCDir) / "FsAccessLog.txt"; |
| 368 | return; | ||
| 369 | |||
| 370 | const auto timestamp = GetTimestamp(); | ||
| 371 | const auto title_id = system.CurrentProcess()->GetTitleID(); | ||
| 372 | json out; | ||
| 373 | 370 | ||
| 374 | out["yuzu_version"] = GetYuzuVersionData(); | 371 | void(Common::FS::AppendStringToFile(access_log_path, Common::FS::FileType::TextFile, |
| 375 | out["report_common"] = GetReportCommonData(title_id, ResultSuccess, timestamp); | 372 | log_message)); |
| 376 | |||
| 377 | out["log_mode"] = fmt::format("{:08X}", static_cast<u32>(log_mode)); | ||
| 378 | out["log_message"] = std::move(log_message); | ||
| 379 | |||
| 380 | SaveToFile(std::move(out), GetPath("filesystem_access_report", title_id, timestamp)); | ||
| 381 | } | 373 | } |
| 382 | 374 | ||
| 383 | void Reporter::SaveUserReport() const { | 375 | void Reporter::SaveUserReport() const { |
| @@ -392,6 +384,18 @@ void Reporter::SaveUserReport() const { | |||
| 392 | GetPath("user_report", title_id, timestamp)); | 384 | GetPath("user_report", title_id, timestamp)); |
| 393 | } | 385 | } |
| 394 | 386 | ||
| 387 | void Reporter::ClearFSAccessLog() const { | ||
| 388 | const auto access_log_path = | ||
| 389 | Common::FS::GetYuzuPath(Common::FS::YuzuPath::SDMCDir) / "FsAccessLog.txt"; | ||
| 390 | |||
| 391 | Common::FS::IOFile access_log_file{access_log_path, Common::FS::FileAccessMode::Write, | ||
| 392 | Common::FS::FileType::TextFile}; | ||
| 393 | |||
| 394 | if (!access_log_file.IsOpen()) { | ||
| 395 | LOG_ERROR(Common_Filesystem, "Failed to clear the filesystem access log."); | ||
| 396 | } | ||
| 397 | } | ||
| 398 | |||
| 395 | bool Reporter::IsReportingEnabled() const { | 399 | bool Reporter::IsReportingEnabled() const { |
| 396 | return Settings::values.reporting_services; | 400 | return Settings::values.reporting_services; |
| 397 | } | 401 | } |
diff --git a/src/core/reporter.h b/src/core/reporter.h index 6fb6ebffa..6e9edeea3 100644 --- a/src/core/reporter.h +++ b/src/core/reporter.h | |||
| @@ -16,10 +16,6 @@ namespace Kernel { | |||
| 16 | class HLERequestContext; | 16 | class HLERequestContext; |
| 17 | } // namespace Kernel | 17 | } // namespace Kernel |
| 18 | 18 | ||
| 19 | namespace Service::FileSystem { | ||
| 20 | enum class LogMode : u32; | ||
| 21 | } | ||
| 22 | |||
| 23 | namespace Service::LM { | 19 | namespace Service::LM { |
| 24 | struct LogMessage; | 20 | struct LogMessage; |
| 25 | } // namespace Service::LM | 21 | } // namespace Service::LM |
| @@ -69,14 +65,15 @@ public: | |||
| 69 | std::optional<std::string> custom_text_main = {}, | 65 | std::optional<std::string> custom_text_main = {}, |
| 70 | std::optional<std::string> custom_text_detail = {}) const; | 66 | std::optional<std::string> custom_text_detail = {}) const; |
| 71 | 67 | ||
| 72 | void SaveFilesystemAccessReport(Service::FileSystem::LogMode log_mode, | 68 | void SaveFSAccessLog(std::string_view log_message) const; |
| 73 | std::string log_message) const; | ||
| 74 | 69 | ||
| 75 | // Can be used anywhere to generate a backtrace and general info report at any point during | 70 | // Can be used anywhere to generate a backtrace and general info report at any point during |
| 76 | // execution. Not intended to be used for anything other than debugging or testing. | 71 | // execution. Not intended to be used for anything other than debugging or testing. |
| 77 | void SaveUserReport() const; | 72 | void SaveUserReport() const; |
| 78 | 73 | ||
| 79 | private: | 74 | private: |
| 75 | void ClearFSAccessLog() const; | ||
| 76 | |||
| 80 | bool IsReportingEnabled() const; | 77 | bool IsReportingEnabled() const; |
| 81 | 78 | ||
| 82 | System& system; | 79 | System& system; |
diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp index a59b36e13..712319783 100644 --- a/src/yuzu/configuration/config.cpp +++ b/src/yuzu/configuration/config.cpp | |||
| @@ -647,6 +647,8 @@ void Config::ReadDebuggingValues() { | |||
| 647 | ReadSetting(QStringLiteral("program_args"), QString{}).toString().toStdString(); | 647 | ReadSetting(QStringLiteral("program_args"), QString{}).toString().toStdString(); |
| 648 | Settings::values.dump_exefs = ReadSetting(QStringLiteral("dump_exefs"), false).toBool(); | 648 | Settings::values.dump_exefs = ReadSetting(QStringLiteral("dump_exefs"), false).toBool(); |
| 649 | Settings::values.dump_nso = ReadSetting(QStringLiteral("dump_nso"), false).toBool(); | 649 | Settings::values.dump_nso = ReadSetting(QStringLiteral("dump_nso"), false).toBool(); |
| 650 | Settings::values.enable_fs_access_log = | ||
| 651 | ReadSetting(QStringLiteral("enable_fs_access_log"), false).toBool(); | ||
| 650 | Settings::values.reporting_services = | 652 | Settings::values.reporting_services = |
| 651 | ReadSetting(QStringLiteral("reporting_services"), false).toBool(); | 653 | ReadSetting(QStringLiteral("reporting_services"), false).toBool(); |
| 652 | Settings::values.quest_flag = ReadSetting(QStringLiteral("quest_flag"), false).toBool(); | 654 | Settings::values.quest_flag = ReadSetting(QStringLiteral("quest_flag"), false).toBool(); |
| @@ -1258,6 +1260,8 @@ void Config::SaveDebuggingValues() { | |||
| 1258 | QString::fromStdString(Settings::values.program_args), QString{}); | 1260 | QString::fromStdString(Settings::values.program_args), QString{}); |
| 1259 | WriteSetting(QStringLiteral("dump_exefs"), Settings::values.dump_exefs, false); | 1261 | WriteSetting(QStringLiteral("dump_exefs"), Settings::values.dump_exefs, false); |
| 1260 | WriteSetting(QStringLiteral("dump_nso"), Settings::values.dump_nso, false); | 1262 | WriteSetting(QStringLiteral("dump_nso"), Settings::values.dump_nso, false); |
| 1263 | WriteSetting(QStringLiteral("enable_fs_access_log"), Settings::values.enable_fs_access_log, | ||
| 1264 | false); | ||
| 1261 | WriteSetting(QStringLiteral("quest_flag"), Settings::values.quest_flag, false); | 1265 | WriteSetting(QStringLiteral("quest_flag"), Settings::values.quest_flag, false); |
| 1262 | WriteSetting(QStringLiteral("use_debug_asserts"), Settings::values.use_debug_asserts, false); | 1266 | WriteSetting(QStringLiteral("use_debug_asserts"), Settings::values.use_debug_asserts, false); |
| 1263 | WriteSetting(QStringLiteral("disable_macro_jit"), Settings::values.disable_macro_jit, false); | 1267 | WriteSetting(QStringLiteral("disable_macro_jit"), Settings::values.disable_macro_jit, false); |
diff --git a/src/yuzu/configuration/configure_debug.cpp b/src/yuzu/configuration/configure_debug.cpp index b207e07cb..15d6a5ad7 100644 --- a/src/yuzu/configuration/configure_debug.cpp +++ b/src/yuzu/configuration/configure_debug.cpp | |||
| @@ -28,17 +28,21 @@ ConfigureDebug::ConfigureDebug(QWidget* parent) : QWidget(parent), ui(new Ui::Co | |||
| 28 | ConfigureDebug::~ConfigureDebug() = default; | 28 | ConfigureDebug::~ConfigureDebug() = default; |
| 29 | 29 | ||
| 30 | void ConfigureDebug::SetConfiguration() { | 30 | void ConfigureDebug::SetConfiguration() { |
| 31 | ui->toggle_console->setEnabled(!Core::System::GetInstance().IsPoweredOn()); | 31 | const bool runtime_lock = !Core::System::GetInstance().IsPoweredOn(); |
| 32 | |||
| 33 | ui->toggle_console->setEnabled(runtime_lock); | ||
| 32 | ui->toggle_console->setChecked(UISettings::values.show_console); | 34 | ui->toggle_console->setChecked(UISettings::values.show_console); |
| 33 | ui->log_filter_edit->setText(QString::fromStdString(Settings::values.log_filter)); | 35 | ui->log_filter_edit->setText(QString::fromStdString(Settings::values.log_filter)); |
| 34 | ui->homebrew_args_edit->setText(QString::fromStdString(Settings::values.program_args)); | 36 | ui->homebrew_args_edit->setText(QString::fromStdString(Settings::values.program_args)); |
| 37 | ui->fs_access_log->setEnabled(runtime_lock); | ||
| 38 | ui->fs_access_log->setChecked(Settings::values.enable_fs_access_log); | ||
| 35 | ui->reporting_services->setChecked(Settings::values.reporting_services); | 39 | ui->reporting_services->setChecked(Settings::values.reporting_services); |
| 36 | ui->quest_flag->setChecked(Settings::values.quest_flag); | 40 | ui->quest_flag->setChecked(Settings::values.quest_flag); |
| 37 | ui->use_debug_asserts->setChecked(Settings::values.use_debug_asserts); | 41 | ui->use_debug_asserts->setChecked(Settings::values.use_debug_asserts); |
| 38 | ui->use_auto_stub->setChecked(Settings::values.use_auto_stub); | 42 | ui->use_auto_stub->setChecked(Settings::values.use_auto_stub); |
| 39 | ui->enable_graphics_debugging->setEnabled(!Core::System::GetInstance().IsPoweredOn()); | 43 | ui->enable_graphics_debugging->setEnabled(runtime_lock); |
| 40 | ui->enable_graphics_debugging->setChecked(Settings::values.renderer_debug); | 44 | ui->enable_graphics_debugging->setChecked(Settings::values.renderer_debug); |
| 41 | ui->disable_macro_jit->setEnabled(!Core::System::GetInstance().IsPoweredOn()); | 45 | ui->disable_macro_jit->setEnabled(runtime_lock); |
| 42 | ui->disable_macro_jit->setChecked(Settings::values.disable_macro_jit); | 46 | ui->disable_macro_jit->setChecked(Settings::values.disable_macro_jit); |
| 43 | ui->extended_logging->setChecked(Settings::values.extended_logging); | 47 | ui->extended_logging->setChecked(Settings::values.extended_logging); |
| 44 | } | 48 | } |
| @@ -47,6 +51,7 @@ void ConfigureDebug::ApplyConfiguration() { | |||
| 47 | UISettings::values.show_console = ui->toggle_console->isChecked(); | 51 | UISettings::values.show_console = ui->toggle_console->isChecked(); |
| 48 | Settings::values.log_filter = ui->log_filter_edit->text().toStdString(); | 52 | Settings::values.log_filter = ui->log_filter_edit->text().toStdString(); |
| 49 | Settings::values.program_args = ui->homebrew_args_edit->text().toStdString(); | 53 | Settings::values.program_args = ui->homebrew_args_edit->text().toStdString(); |
| 54 | Settings::values.enable_fs_access_log = ui->fs_access_log->isChecked(); | ||
| 50 | Settings::values.reporting_services = ui->reporting_services->isChecked(); | 55 | Settings::values.reporting_services = ui->reporting_services->isChecked(); |
| 51 | Settings::values.quest_flag = ui->quest_flag->isChecked(); | 56 | Settings::values.quest_flag = ui->quest_flag->isChecked(); |
| 52 | Settings::values.use_debug_asserts = ui->use_debug_asserts->isChecked(); | 57 | Settings::values.use_debug_asserts = ui->use_debug_asserts->isChecked(); |
diff --git a/src/yuzu/configuration/configure_debug.ui b/src/yuzu/configuration/configure_debug.ui index c9e60ee08..c8087542f 100644 --- a/src/yuzu/configuration/configure_debug.ui +++ b/src/yuzu/configuration/configure_debug.ui | |||
| @@ -144,10 +144,17 @@ | |||
| 144 | <item> | 144 | <item> |
| 145 | <widget class="QGroupBox" name="groupBox_5"> | 145 | <widget class="QGroupBox" name="groupBox_5"> |
| 146 | <property name="title"> | 146 | <property name="title"> |
| 147 | <string>Dump</string> | 147 | <string>Debugging</string> |
| 148 | </property> | 148 | </property> |
| 149 | <layout class="QVBoxLayout" name="verticalLayout_7"> | 149 | <layout class="QVBoxLayout" name="verticalLayout_7"> |
| 150 | <item> | 150 | <item> |
| 151 | <widget class="QCheckBox" name="fs_access_log"> | ||
| 152 | <property name="text"> | ||
| 153 | <string>Enable FS Access Log</string> | ||
| 154 | </property> | ||
| 155 | </widget> | ||
| 156 | </item> | ||
| 157 | <item> | ||
| 151 | <widget class="QCheckBox" name="reporting_services"> | 158 | <widget class="QCheckBox" name="reporting_services"> |
| 152 | <property name="text"> | 159 | <property name="text"> |
| 153 | <string>Enable Verbose Reporting Services</string> | 160 | <string>Enable Verbose Reporting Services</string> |
diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp index 63f368fe5..107f097d0 100644 --- a/src/yuzu_cmd/config.cpp +++ b/src/yuzu_cmd/config.cpp | |||
| @@ -477,6 +477,8 @@ void Config::ReadValues() { | |||
| 477 | Settings::values.program_args = sdl2_config->Get("Debugging", "program_args", ""); | 477 | Settings::values.program_args = sdl2_config->Get("Debugging", "program_args", ""); |
| 478 | Settings::values.dump_exefs = sdl2_config->GetBoolean("Debugging", "dump_exefs", false); | 478 | Settings::values.dump_exefs = sdl2_config->GetBoolean("Debugging", "dump_exefs", false); |
| 479 | Settings::values.dump_nso = sdl2_config->GetBoolean("Debugging", "dump_nso", false); | 479 | Settings::values.dump_nso = sdl2_config->GetBoolean("Debugging", "dump_nso", false); |
| 480 | Settings::values.enable_fs_access_log = | ||
| 481 | sdl2_config->GetBoolean("Debugging", "enable_fs_access_log", false); | ||
| 480 | Settings::values.reporting_services = | 482 | Settings::values.reporting_services = |
| 481 | sdl2_config->GetBoolean("Debugging", "reporting_services", false); | 483 | sdl2_config->GetBoolean("Debugging", "reporting_services", false); |
| 482 | Settings::values.quest_flag = sdl2_config->GetBoolean("Debugging", "quest_flag", false); | 484 | Settings::values.quest_flag = sdl2_config->GetBoolean("Debugging", "quest_flag", false); |
diff --git a/src/yuzu_cmd/default_ini.h b/src/yuzu_cmd/default_ini.h index f48d935a1..c32421671 100644 --- a/src/yuzu_cmd/default_ini.h +++ b/src/yuzu_cmd/default_ini.h | |||
| @@ -338,6 +338,8 @@ record_frame_times = | |||
| 338 | dump_exefs=false | 338 | dump_exefs=false |
| 339 | # Determines whether or not yuzu will dump all NSOs it attempts to load while loading them | 339 | # Determines whether or not yuzu will dump all NSOs it attempts to load while loading them |
| 340 | dump_nso=false | 340 | dump_nso=false |
| 341 | # Determines whether or not yuzu will save the filesystem access log. | ||
| 342 | enable_fs_access_log=false | ||
| 341 | # Determines whether or not yuzu will report to the game that the emulated console is in Kiosk Mode | 343 | # Determines whether or not yuzu will report to the game that the emulated console is in Kiosk Mode |
| 342 | # false: Retail/Normal Mode (default), true: Kiosk Mode | 344 | # false: Retail/Normal Mode (default), true: Kiosk Mode |
| 343 | quest_flag = | 345 | quest_flag = |