Skip to content

Commit

Permalink
Misc: Collapse more niche log channels
Browse files Browse the repository at this point in the history
  • Loading branch information
stenzek committed Dec 1, 2024
1 parent 9df5971 commit e9848a6
Show file tree
Hide file tree
Showing 14 changed files with 18 additions and 34 deletions.
14 changes: 2 additions & 12 deletions src/common/log_channels.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

#define ENUMERATE_LOG_CHANNELS(X) \
X(Achievements) \
X(AnalogController) \
X(AnalogJoystick) \
X(AudioStream) \
X(AutoUpdaterDialog) \
X(BIOS) \
Expand All @@ -16,7 +14,7 @@
X(Cheats) \
X(CodeCache) \
X(CompressHelpers) \
X(ControllerBindingWidget) \
X(Controller) \
X(CubebAudioStream) \
X(CueParser) \
X(DInputSource) \
Expand All @@ -27,37 +25,29 @@
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) \
X(ImGuiManager) \
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) \
Expand Down
2 changes: 1 addition & 1 deletion src/core/analog_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#include <cmath>

LOG_CHANNEL(AnalogController);
LOG_CHANNEL(Controller);

AnalogController::AnalogController(u32 index) : Controller(index)
{
Expand Down
2 changes: 1 addition & 1 deletion src/core/analog_joystick.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "IconsPromptFont.h"
#include "fmt/format.h"

LOG_CHANNEL(AnalogJoystick);
LOG_CHANNEL(Controller);

AnalogJoystick::AnalogJoystick(u32 index) : Controller(index)
{
Expand Down
2 changes: 1 addition & 1 deletion src/core/gpu_backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "common/log.h"
#include "common/timer.h"

LOG_CHANNEL(GPUBackend);
LOG_CHANNEL(GPU);

std::unique_ptr<GPUBackend> g_gpu_backend;

Expand Down
2 changes: 1 addition & 1 deletion src/core/gpu_hw_texture_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include <numeric>
#include <unordered_set>

LOG_CHANNEL(GPUTextureCache);
LOG_CHANNEL(GPU_HW);

#include "common/ryml_helpers.h"

Expand Down
2 changes: 1 addition & 1 deletion src/core/gpu_sw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include <algorithm>

LOG_CHANNEL(GPU_SW);
LOG_CHANNEL(GPU);

GPU_SW::GPU_SW() = default;

Expand Down
2 changes: 1 addition & 1 deletion src/core/gpu_sw_rasterizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
14 changes: 4 additions & 10 deletions src/core/guncon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,15 @@
#include "util/state_wrapper.h"

#include "common/assert.h"
#include "common/log.h"
#include "common/path.h"
#include "common/string_util.h"

#include "IconsPromptFont.h"

#include <array>

#if defined(_DEBUG) || defined(_DEVEL)
#include "common/log.h"
LOG_CHANNEL(GunCon);
#endif
LOG_CHANNEL(Controller);

static constexpr std::array<u8, static_cast<size_t>(GunCon::Binding::ButtonCount)> s_button_indices = {{13, 3, 14}};

Expand Down Expand Up @@ -264,13 +262,9 @@ std::unique_ptr<GunCon> 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<u32>(binding), InputBindingInfo::Type::Button, genb \
}
{name, display_name, icon_name, static_cast<u32>(binding), InputBindingInfo::Type::Button, genb}
#define HALFAXIS(name, display_name, icon_name, binding, genb) \
{ \
name, display_name, icon_name, static_cast<u32>(binding), InputBindingInfo::Type::HalfAxis, genb \
}
{name, display_name, icon_name, static_cast<u32>(binding), InputBindingInfo::Type::HalfAxis, genb}

// clang-format off
{"Pointer", TRANSLATE_NOOP("GunCon", "Pointer/Aiming"), ICON_PF_MOUSE, static_cast<u32>(GunCon::Binding::ButtonCount), InputBindingInfo::Type::Pointer, GenericInputBinding::Unknown},
Expand Down
2 changes: 1 addition & 1 deletion src/core/jogcon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include "IconsPromptFont.h"
#include "fmt/format.h"

LOG_CHANNEL(AnalogController);
LOG_CHANNEL(Controller);

JogCon::JogCon(u32 index) : Controller(index)
{
Expand Down
2 changes: 1 addition & 1 deletion src/core/justifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "IconsPromptFont.h"
#include <array>

LOG_CHANNEL(Justifier);
LOG_CHANNEL(Controller);

// #define CHECK_TIMING 1
#ifdef CHECK_TIMING
Expand Down
2 changes: 1 addition & 1 deletion src/core/negcon_rumble.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include <cmath>

LOG_CHANNEL(NeGconRumble);
LOG_CHANNEL(Controller);

// Mapping of Button to index of corresponding bit in m_button_state
static constexpr std::array<u8, static_cast<size_t>(NeGconRumble::Button::Count)> s_button_indices = {3, 4, 5, 6,
Expand Down
2 changes: 1 addition & 1 deletion src/core/playstation_mouse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <array>
#include <cmath>

LOG_CHANNEL(PlayStationMouse);
LOG_CHANNEL(Controller);

static constexpr std::array<u8, static_cast<size_t>(PlayStationMouse::Binding::ButtonCount)> s_button_indices = {
{11, 10}};
Expand Down
2 changes: 1 addition & 1 deletion src/duckstation-qt/controllerbindingwidgets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#include <QtWidgets/QSpinBox>
#include <algorithm>

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)
Expand Down
2 changes: 1 addition & 1 deletion src/util/gpu_shader_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "compress_helpers.h"

LOG_CHANNEL(GPUShaderCache);
LOG_CHANNEL(GPUDevice);

#pragma pack(push, 1)
struct CacheFileHeader
Expand Down

0 comments on commit e9848a6

Please sign in to comment.