From e9848a618278d4869e68df522857f63c4d3380f5 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sun, 1 Dec 2024 23:14:24 +1000 Subject: [PATCH] Misc: Collapse more niche log channels --- src/common/log_channels.h | 14 ++------------ src/core/analog_controller.cpp | 2 +- src/core/analog_joystick.cpp | 2 +- src/core/gpu_backend.cpp | 2 +- src/core/gpu_hw_texture_cache.cpp | 2 +- src/core/gpu_sw.cpp | 2 +- src/core/gpu_sw_rasterizer.cpp | 2 +- src/core/guncon.cpp | 14 ++++---------- src/core/jogcon.cpp | 2 +- src/core/justifier.cpp | 2 +- src/core/negcon_rumble.cpp | 2 +- src/core/playstation_mouse.cpp | 2 +- src/duckstation-qt/controllerbindingwidgets.cpp | 2 +- src/util/gpu_shader_cache.cpp | 2 +- 14 files changed, 18 insertions(+), 34 deletions(-) diff --git a/src/common/log_channels.h b/src/common/log_channels.h index b075a8764..5ccab2409 100644 --- a/src/common/log_channels.h +++ b/src/common/log_channels.h @@ -3,8 +3,6 @@ #define ENUMERATE_LOG_CHANNELS(X) \ X(Achievements) \ - X(AnalogController) \ - X(AnalogJoystick) \ X(AudioStream) \ X(AutoUpdaterDialog) \ X(BIOS) \ @@ -16,7 +14,7 @@ X(Cheats) \ X(CodeCache) \ X(CompressHelpers) \ - X(ControllerBindingWidget) \ + X(Controller) \ X(CubebAudioStream) \ X(CueParser) \ X(DInputSource) \ @@ -27,17 +25,12 @@ X(FullscreenUI) \ X(GDBProtocol) \ X(GPU) \ - X(GPUBackend) \ X(GPUDevice) \ X(GPUDump) \ - X(GPUShaderCache) \ - X(GPUTextureCache) \ - X(GPU_HW) \ X(GPU_SW) \ - X(GPU_SW_Rasterizer) \ + X(GPU_HW) \ X(GameDatabase) \ X(GameList) \ - X(GunCon) \ X(HTTPDownloader) \ X(Host) \ X(ImGuiFullscreen) \ @@ -45,19 +38,16 @@ X(Image) \ X(InputManager) \ X(InterruptController) \ - X(Justifier) \ X(Log) \ X(MDEC) \ X(MediaCapture) \ X(MemMap) \ X(MemoryCard) \ X(Multitap) \ - X(NeGconRumble) \ X(PCDrv) \ X(Pad) \ X(PerfMon) \ X(PlatformMisc) \ - X(PlayStationMouse) \ X(PostProcessing) \ X(ProgressCallback) \ X(ReShadeFXShader) \ diff --git a/src/core/analog_controller.cpp b/src/core/analog_controller.cpp index c064325ab..ffd777ba6 100644 --- a/src/core/analog_controller.cpp +++ b/src/core/analog_controller.cpp @@ -20,7 +20,7 @@ #include -LOG_CHANNEL(AnalogController); +LOG_CHANNEL(Controller); AnalogController::AnalogController(u32 index) : Controller(index) { diff --git a/src/core/analog_joystick.cpp b/src/core/analog_joystick.cpp index 4b545180b..a4ea53dce 100644 --- a/src/core/analog_joystick.cpp +++ b/src/core/analog_joystick.cpp @@ -16,7 +16,7 @@ #include "IconsPromptFont.h" #include "fmt/format.h" -LOG_CHANNEL(AnalogJoystick); +LOG_CHANNEL(Controller); AnalogJoystick::AnalogJoystick(u32 index) : Controller(index) { diff --git a/src/core/gpu_backend.cpp b/src/core/gpu_backend.cpp index b24c3f6b0..59d883dc5 100644 --- a/src/core/gpu_backend.cpp +++ b/src/core/gpu_backend.cpp @@ -9,7 +9,7 @@ #include "common/log.h" #include "common/timer.h" -LOG_CHANNEL(GPUBackend); +LOG_CHANNEL(GPU); std::unique_ptr g_gpu_backend; diff --git a/src/core/gpu_hw_texture_cache.cpp b/src/core/gpu_hw_texture_cache.cpp index 43ab7d4d1..347246152 100644 --- a/src/core/gpu_hw_texture_cache.cpp +++ b/src/core/gpu_hw_texture_cache.cpp @@ -37,7 +37,7 @@ #include #include -LOG_CHANNEL(GPUTextureCache); +LOG_CHANNEL(GPU_HW); #include "common/ryml_helpers.h" diff --git a/src/core/gpu_sw.cpp b/src/core/gpu_sw.cpp index fd781af63..9159dbddc 100644 --- a/src/core/gpu_sw.cpp +++ b/src/core/gpu_sw.cpp @@ -16,7 +16,7 @@ #include -LOG_CHANNEL(GPU_SW); +LOG_CHANNEL(GPU); GPU_SW::GPU_SW() = default; diff --git a/src/core/gpu_sw_rasterizer.cpp b/src/core/gpu_sw_rasterizer.cpp index 76cfc99db..3f2246e65 100644 --- a/src/core/gpu_sw_rasterizer.cpp +++ b/src/core/gpu_sw_rasterizer.cpp @@ -10,7 +10,7 @@ #include "common/log.h" #include "common/string_util.h" -LOG_CHANNEL(GPU_SW_Rasterizer); +LOG_CHANNEL(GPU_SW); namespace GPU_SW_Rasterizer { constinit const DitherLUT g_dither_lut = []() constexpr { diff --git a/src/core/guncon.cpp b/src/core/guncon.cpp index d58ec1054..c2a75c452 100644 --- a/src/core/guncon.cpp +++ b/src/core/guncon.cpp @@ -11,6 +11,7 @@ #include "util/state_wrapper.h" #include "common/assert.h" +#include "common/log.h" #include "common/path.h" #include "common/string_util.h" @@ -18,10 +19,7 @@ #include -#if defined(_DEBUG) || defined(_DEVEL) -#include "common/log.h" -LOG_CHANNEL(GunCon); -#endif +LOG_CHANNEL(Controller); static constexpr std::array(GunCon::Binding::ButtonCount)> s_button_indices = {{13, 3, 14}}; @@ -264,13 +262,9 @@ std::unique_ptr GunCon::Create(u32 index) static const Controller::ControllerBindingInfo s_binding_info[] = { #define BUTTON(name, display_name, icon_name, binding, genb) \ - { \ - name, display_name, icon_name, static_cast(binding), InputBindingInfo::Type::Button, genb \ - } + {name, display_name, icon_name, static_cast(binding), InputBindingInfo::Type::Button, genb} #define HALFAXIS(name, display_name, icon_name, binding, genb) \ - { \ - name, display_name, icon_name, static_cast(binding), InputBindingInfo::Type::HalfAxis, genb \ - } + {name, display_name, icon_name, static_cast(binding), InputBindingInfo::Type::HalfAxis, genb} // clang-format off {"Pointer", TRANSLATE_NOOP("GunCon", "Pointer/Aiming"), ICON_PF_MOUSE, static_cast(GunCon::Binding::ButtonCount), InputBindingInfo::Type::Pointer, GenericInputBinding::Unknown}, diff --git a/src/core/jogcon.cpp b/src/core/jogcon.cpp index 0f1e29719..ca5663018 100644 --- a/src/core/jogcon.cpp +++ b/src/core/jogcon.cpp @@ -18,7 +18,7 @@ #include "IconsPromptFont.h" #include "fmt/format.h" -LOG_CHANNEL(AnalogController); +LOG_CHANNEL(Controller); JogCon::JogCon(u32 index) : Controller(index) { diff --git a/src/core/justifier.cpp b/src/core/justifier.cpp index cb6b0c693..89fcacd2e 100644 --- a/src/core/justifier.cpp +++ b/src/core/justifier.cpp @@ -19,7 +19,7 @@ #include "IconsPromptFont.h" #include -LOG_CHANNEL(Justifier); +LOG_CHANNEL(Controller); // #define CHECK_TIMING 1 #ifdef CHECK_TIMING diff --git a/src/core/negcon_rumble.cpp b/src/core/negcon_rumble.cpp index 01c732c7a..ac3728b32 100644 --- a/src/core/negcon_rumble.cpp +++ b/src/core/negcon_rumble.cpp @@ -23,7 +23,7 @@ #include -LOG_CHANNEL(NeGconRumble); +LOG_CHANNEL(Controller); // Mapping of Button to index of corresponding bit in m_button_state static constexpr std::array(NeGconRumble::Button::Count)> s_button_indices = {3, 4, 5, 6, diff --git a/src/core/playstation_mouse.cpp b/src/core/playstation_mouse.cpp index 73b33e76d..f24e1874b 100644 --- a/src/core/playstation_mouse.cpp +++ b/src/core/playstation_mouse.cpp @@ -16,7 +16,7 @@ #include #include -LOG_CHANNEL(PlayStationMouse); +LOG_CHANNEL(Controller); static constexpr std::array(PlayStationMouse::Binding::ButtonCount)> s_button_indices = { {11, 10}}; diff --git a/src/duckstation-qt/controllerbindingwidgets.cpp b/src/duckstation-qt/controllerbindingwidgets.cpp index 226d2c578..66dfc5684 100644 --- a/src/duckstation-qt/controllerbindingwidgets.cpp +++ b/src/duckstation-qt/controllerbindingwidgets.cpp @@ -39,7 +39,7 @@ #include #include -LOG_CHANNEL(ControllerBindingWidget); +LOG_CHANNEL(Host); ControllerBindingWidget::ControllerBindingWidget(QWidget* parent, ControllerSettingsWindow* dialog, u32 port) : QWidget(parent), m_dialog(dialog), m_config_section(Controller::GetSettingsSection(port)), m_port_number(port) diff --git a/src/util/gpu_shader_cache.cpp b/src/util/gpu_shader_cache.cpp index 9ab35fc3d..4c4f2dc19 100644 --- a/src/util/gpu_shader_cache.cpp +++ b/src/util/gpu_shader_cache.cpp @@ -15,7 +15,7 @@ #include "compress_helpers.h" -LOG_CHANNEL(GPUShaderCache); +LOG_CHANNEL(GPUDevice); #pragma pack(push, 1) struct CacheFileHeader