Skip to content

Commit

Permalink
Misc: Slightly reduce include pollution from settings.h
Browse files Browse the repository at this point in the history
  • Loading branch information
stenzek committed Dec 21, 2024
1 parent 01dfc9a commit e1bd569
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 16 deletions.
15 changes: 8 additions & 7 deletions src/core/analog_joystick.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#include "common/bitutils.h"
#include "common/log.h"
#include "common/settings_interface.h"
#include "common/string_util.h"

#include "IconsFontAwesome5.h"
Expand Down Expand Up @@ -340,14 +341,14 @@ std::unique_ptr<AnalogJoystick> AnalogJoystick::Create(u32 index)

static const Controller::ControllerBindingInfo s_binding_info[] = {
#define BUTTON(name, display_name, icon_name, button, genb) \
{ \
name, display_name, icon_name, static_cast<u32>(button), InputBindingInfo::Type::Button, genb \
}
{name, display_name, icon_name, static_cast<u32>(button), InputBindingInfo::Type::Button, genb}
#define AXIS(name, display_name, icon_name, halfaxis, genb) \
{ \
name, display_name, icon_name, static_cast<u32>(AnalogJoystick::Button::Count) + static_cast<u32>(halfaxis), \
InputBindingInfo::Type::HalfAxis, genb \
}
{name, \
display_name, \
icon_name, \
static_cast<u32>(AnalogJoystick::Button::Count) + static_cast<u32>(halfaxis), \
InputBindingInfo::Type::HalfAxis, \
genb}

// clang-format off
BUTTON("Up", TRANSLATE_NOOP("AnalogJoystick", "D-Pad Up"), ICON_PF_DPAD_UP, AnalogJoystick::Button::Up, GenericInputBinding::DPadUp),
Expand Down
1 change: 1 addition & 0 deletions src/core/cheats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "common/file_system.h"
#include "common/log.h"
#include "common/path.h"
#include "common/settings_interface.h"
#include "common/small_string.h"
#include "common/string_util.h"
#include "common/zip_helpers.h"
Expand Down
1 change: 1 addition & 0 deletions src/core/cpu_recompiler_x64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "common/align.h"
#include "common/assert.h"
#include "common/log.h"
#include "common/small_string.h"
#include "common/string_util.h"

#include <limits>
Expand Down
15 changes: 8 additions & 7 deletions src/core/negcon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "common/assert.h"
#include "common/bitutils.h"
#include "common/log.h"
#include "common/settings_interface.h"

#include "IconsPromptFont.h"

Expand Down Expand Up @@ -261,14 +262,14 @@ std::unique_ptr<NeGcon> NeGcon::Create(u32 index)

static const Controller::ControllerBindingInfo s_binding_info[] = {
#define BUTTON(name, display_name, icon_name, button, genb) \
{ \
name, display_name, icon_name, static_cast<u32>(button), InputBindingInfo::Type::Button, genb \
}
{name, display_name, icon_name, static_cast<u32>(button), InputBindingInfo::Type::Button, genb}
#define AXIS(name, display_name, icon_name, halfaxis, genb) \
{ \
name, display_name, icon_name, static_cast<u32>(NeGcon::Button::Count) + static_cast<u32>(halfaxis), \
InputBindingInfo::Type::HalfAxis, genb \
}
{name, \
display_name, \
icon_name, \
static_cast<u32>(NeGcon::Button::Count) + static_cast<u32>(halfaxis), \
InputBindingInfo::Type::HalfAxis, \
genb}

// clang-format off
BUTTON("Up", TRANSLATE_NOOP("NeGcon", "D-Pad Up"), ICON_PF_DPAD_UP, NeGcon::Button::Up, GenericInputBinding::DPadUp),
Expand Down
1 change: 1 addition & 0 deletions src/core/playstation_mouse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#include "common/assert.h"
#include "common/log.h"
#include "common/settings_interface.h"

#include "IconsPromptFont.h"

Expand Down
4 changes: 2 additions & 2 deletions src/core/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
#include "util/audio_stream.h"

#include "common/log.h"
#include "common/settings_interface.h"
#include "common/small_string.h"

#include <array>
#include <optional>
Expand All @@ -18,6 +16,8 @@
#include <string_view>
#include <vector>

class SettingsInterface;

enum class RenderAPI : u8;
enum class MediaCaptureBackend : u8;

Expand Down
1 change: 1 addition & 0 deletions src/core/timing_event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#include "common/assert.h"
#include "common/log.h"
#include "common/small_string.h"
#include "common/thirdparty/SmallVector.h"

LOG_CHANNEL(TimingEvents);
Expand Down

0 comments on commit e1bd569

Please sign in to comment.