mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-25 06:05:38 +01:00
hid/controller/npad: Move npad_id_list into the cpp file
This is just a lookup table, and since it's private, there's nothing really stateful about it, so we can just move it into the cpp file.
This commit is contained in:
parent
aeca224890
commit
aeda743446
@ -20,6 +20,7 @@
|
|||||||
#include "core/settings.h"
|
#include "core/settings.h"
|
||||||
|
|
||||||
namespace Service::HID {
|
namespace Service::HID {
|
||||||
|
|
||||||
constexpr u32 JOYCON_BODY_NEON_RED = 0xFF3C28;
|
constexpr u32 JOYCON_BODY_NEON_RED = 0xFF3C28;
|
||||||
constexpr u32 JOYCON_BUTTONS_NEON_RED = 0x1E0A0A;
|
constexpr u32 JOYCON_BUTTONS_NEON_RED = 0x1E0A0A;
|
||||||
constexpr u32 JOYCON_BODY_NEON_BLUE = 0x0AB9E6;
|
constexpr u32 JOYCON_BODY_NEON_BLUE = 0x0AB9E6;
|
||||||
@ -28,7 +29,15 @@ constexpr s32 HID_JOYSTICK_MAX = 0x7fff;
|
|||||||
constexpr s32 HID_JOYSTICK_MIN = -0x7fff;
|
constexpr s32 HID_JOYSTICK_MIN = -0x7fff;
|
||||||
constexpr std::size_t NPAD_OFFSET = 0x9A00;
|
constexpr std::size_t NPAD_OFFSET = 0x9A00;
|
||||||
constexpr u32 BATTERY_FULL = 2;
|
constexpr u32 BATTERY_FULL = 2;
|
||||||
enum class JoystickId : std::size_t { Joystick_Left, Joystick_Right };
|
|
||||||
|
constexpr std::array<u32, 10> npad_id_list{
|
||||||
|
0, 1, 2, 3, 4, 5, 6, 7, 32, 16,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum class JoystickId : std::size_t {
|
||||||
|
Joystick_Left,
|
||||||
|
Joystick_Right,
|
||||||
|
};
|
||||||
|
|
||||||
Controller_NPad::Controller_NPad() = default;
|
Controller_NPad::Controller_NPad() = default;
|
||||||
Controller_NPad::~Controller_NPad() = default;
|
Controller_NPad::~Controller_NPad() = default;
|
||||||
|
@ -280,7 +280,6 @@ private:
|
|||||||
Kernel::SharedPtr<Kernel::Event> styleset_changed_event;
|
Kernel::SharedPtr<Kernel::Event> styleset_changed_event;
|
||||||
std::size_t dump_idx{};
|
std::size_t dump_idx{};
|
||||||
Vibration last_processed_vibration{};
|
Vibration last_processed_vibration{};
|
||||||
static constexpr std::array<u32, 10> npad_id_list{0, 1, 2, 3, 4, 5, 6, 7, 32, 16};
|
|
||||||
std::array<ControllerHolder, 10> connected_controllers{};
|
std::array<ControllerHolder, 10> connected_controllers{};
|
||||||
bool can_controllers_vibrate{true};
|
bool can_controllers_vibrate{true};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user