More settings

This commit is contained in:
georgemoralis
2025-11-27 19:26:10 +02:00
parent 6bb8ad8968
commit d39ff10747
7 changed files with 24 additions and 72 deletions

View File

@@ -22,6 +22,7 @@
#include "common/path_util.h"
#include "common/string_util.h"
#include "common/thread.h"
#include "core/emulator_settings.h"
namespace Common::Log {
@@ -139,7 +140,7 @@ public:
const auto& log_dir = GetUserPath(PathType::LogDir);
std::filesystem::create_directory(log_dir);
Filter filter;
filter.ParseFilterString(Config::getLogFilter());
filter.ParseFilterString(EmulatorSettings::GetInstance()->GetLogFilter());
const auto& log_file_path = log_file.empty() ? LOG_FILE : log_file;
instance = std::unique_ptr<Impl, decltype(&Deleter)>(
new Impl(log_dir / log_file_path, filter), Deleter);
@@ -220,7 +221,7 @@ public:
.function = function,
.message = std::move(message),
};
if (Config::getLogType() == "async") {
if (EmulatorSettings::GetInstance()->GetLogType() == "async") {
message_queue.EmplaceWait(entry);
} else {
ForEachBackend([&entry](auto& backend) { backend.Write(entry); });