diff options
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/common/host_memory.cpp | 2 | ||||
-rw-r--r-- | src/common/logging/backend.cpp | 3 | ||||
-rw-r--r-- | src/common/logging/log.h | 6 | ||||
-rw-r--r-- | src/common/logging/log_entry.h | 28 | ||||
-rw-r--r-- | src/common/logging/text_formatter.cpp | 1 | ||||
-rw-r--r-- | src/common/logging/types.h | 17 | ||||
-rw-r--r-- | src/common/param_package.cpp | 1 | ||||
-rw-r--r-- | src/common/settings.cpp | 2 | ||||
-rw-r--r-- | src/common/settings.h | 2 |
10 files changed, 40 insertions, 23 deletions
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index b18a2a2f5..cb5c0f326 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -79,6 +79,7 @@ add_library(common STATIC logging/filter.cpp logging/filter.h logging/log.h + logging/log_entry.h logging/text_formatter.cpp logging/text_formatter.h logging/types.h diff --git a/src/common/host_memory.cpp b/src/common/host_memory.cpp index 6661244cf..b44a44949 100644 --- a/src/common/host_memory.cpp +++ b/src/common/host_memory.cpp @@ -314,8 +314,8 @@ private: } void UntrackPlaceholder(boost::icl::separate_interval_set<size_t>::iterator it) { - placeholders.erase(it); placeholder_host_pointers.erase(it->lower()); + placeholders.erase(it); } /// Return true when a given memory region is a "nieche" and the placeholders don't have to be diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp index e40d117d6..0e85a9c1d 100644 --- a/src/common/logging/backend.cpp +++ b/src/common/logging/backend.cpp @@ -9,6 +9,8 @@ #include <thread> #include <vector> +#include <fmt/format.h> + #ifdef _WIN32 #include <windows.h> // For OutputDebugStringW #endif @@ -22,6 +24,7 @@ #include "common/logging/backend.h" #include "common/logging/log.h" +#include "common/logging/log_entry.h" #include "common/logging/text_formatter.h" #include "common/settings.h" #ifdef _WIN32 diff --git a/src/common/logging/log.h b/src/common/logging/log.h index 8d43eddc7..c186d55ef 100644 --- a/src/common/logging/log.h +++ b/src/common/logging/log.h @@ -4,7 +4,11 @@ #pragma once -#include <fmt/format.h> +#include <algorithm> +#include <string_view> + +#include <fmt/core.h> + #include "common/logging/types.h" namespace Common::Log { diff --git a/src/common/logging/log_entry.h b/src/common/logging/log_entry.h new file mode 100644 index 000000000..dd6f44841 --- /dev/null +++ b/src/common/logging/log_entry.h @@ -0,0 +1,28 @@ +// Copyright 2021 yuzu Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include <chrono> + +#include "common/logging/types.h" + +namespace Common::Log { + +/** + * A log entry. Log entries are store in a structured format to permit more varied output + * formatting on different frontends, as well as facilitating filtering and aggregation. + */ +struct Entry { + std::chrono::microseconds timestamp; + Class log_class{}; + Level log_level{}; + const char* filename = nullptr; + unsigned int line_num = 0; + std::string function; + std::string message; + bool final_entry = false; +}; + +} // namespace Common::Log diff --git a/src/common/logging/text_formatter.cpp b/src/common/logging/text_formatter.cpp index cfc0d5846..10b2281db 100644 --- a/src/common/logging/text_formatter.cpp +++ b/src/common/logging/text_formatter.cpp @@ -13,6 +13,7 @@ #include "common/common_funcs.h" #include "common/logging/filter.h" #include "common/logging/log.h" +#include "common/logging/log_entry.h" #include "common/logging/text_formatter.h" #include "common/string_util.h" diff --git a/src/common/logging/types.h b/src/common/logging/types.h index ddf9d27ca..2d21fc483 100644 --- a/src/common/logging/types.h +++ b/src/common/logging/types.h @@ -4,8 +4,6 @@ #pragma once -#include <chrono> - #include "common/common_types.h" namespace Common::Log { @@ -131,19 +129,4 @@ enum class Class : u8 { Count ///< Total number of logging classes }; -/** - * A log entry. Log entries are store in a structured format to permit more varied output - * formatting on different frontends, as well as facilitating filtering and aggregation. - */ -struct Entry { - std::chrono::microseconds timestamp; - Class log_class{}; - Level log_level{}; - const char* filename = nullptr; - unsigned int line_num = 0; - std::string function; - std::string message; - bool final_entry = false; -}; - } // namespace Common::Log diff --git a/src/common/param_package.cpp b/src/common/param_package.cpp index b916b4866..bbf20f5eb 100644 --- a/src/common/param_package.cpp +++ b/src/common/param_package.cpp @@ -3,6 +3,7 @@ // Refer to the license.txt file included. #include <array> +#include <stdexcept> #include <utility> #include <vector> diff --git a/src/common/settings.cpp b/src/common/settings.cpp index 69f0bd8c0..9dd5e3efb 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp @@ -69,8 +69,6 @@ void LogSettings() { log_path("DataStorage_NANDDir", Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir)); log_path("DataStorage_SDMCDir", Common::FS::GetYuzuPath(Common::FS::YuzuPath::SDMCDir)); log_setting("Debugging_ProgramArgs", values.program_args.GetValue()); - log_setting("Services_BCATBackend", values.bcat_backend.GetValue()); - log_setting("Services_BCATBoxcatLocal", values.bcat_boxcat_local.GetValue()); log_setting("Input_EnableMotion", values.motion_enabled.GetValue()); log_setting("Input_EnableVibration", values.vibration_enabled.GetValue()); log_setting("Input_EnableRawInput", values.enable_raw_input.GetValue()); diff --git a/src/common/settings.h b/src/common/settings.h index c53d5acc3..402339443 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -568,8 +568,6 @@ struct Values { BasicSetting<bool> use_dev_keys{false, "use_dev_keys"}; // Network - BasicSetting<std::string> bcat_backend{"none", "bcat_backend"}; - BasicSetting<bool> bcat_boxcat_local{false, "bcat_boxcat_local"}; BasicSetting<std::string> network_interface{std::string(), "network_interface"}; // WebService |