summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-10-18 02:41:45 +0200
committerLioncash <mathew1800@gmail.com>2018-10-18 02:52:45 +0200
commitaeda7434465e2aa076ede9a23aa1726a8d78d66b (patch)
treea9137c92c68923912dab7a0ed89d63793f5cdc18
parenthid/controller/npad: Remove unnecessary const from void return type (diff)
downloadyuzu-aeda7434465e2aa076ede9a23aa1726a8d78d66b.tar
yuzu-aeda7434465e2aa076ede9a23aa1726a8d78d66b.tar.gz
yuzu-aeda7434465e2aa076ede9a23aa1726a8d78d66b.tar.bz2
yuzu-aeda7434465e2aa076ede9a23aa1726a8d78d66b.tar.lz
yuzu-aeda7434465e2aa076ede9a23aa1726a8d78d66b.tar.xz
yuzu-aeda7434465e2aa076ede9a23aa1726a8d78d66b.tar.zst
yuzu-aeda7434465e2aa076ede9a23aa1726a8d78d66b.zip
-rw-r--r--src/core/hle/service/hid/controllers/npad.cpp11
-rw-r--r--src/core/hle/service/hid/controllers/npad.h1
2 files changed, 10 insertions, 2 deletions
diff --git a/src/core/hle/service/hid/controllers/npad.cpp b/src/core/hle/service/hid/controllers/npad.cpp
index 954869619..9a781b026 100644
--- a/src/core/hle/service/hid/controllers/npad.cpp
+++ b/src/core/hle/service/hid/controllers/npad.cpp
@@ -20,6 +20,7 @@
#include "core/settings.h"
namespace Service::HID {
+
constexpr u32 JOYCON_BODY_NEON_RED = 0xFF3C28;
constexpr u32 JOYCON_BUTTONS_NEON_RED = 0x1E0A0A;
constexpr u32 JOYCON_BODY_NEON_BLUE = 0x0AB9E6;
@@ -28,7 +29,15 @@ constexpr s32 HID_JOYSTICK_MAX = 0x7fff;
constexpr s32 HID_JOYSTICK_MIN = -0x7fff;
constexpr std::size_t NPAD_OFFSET = 0x9A00;
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;
diff --git a/src/core/hle/service/hid/controllers/npad.h b/src/core/hle/service/hid/controllers/npad.h
index 6178a2e4c..6d85a6358 100644
--- a/src/core/hle/service/hid/controllers/npad.h
+++ b/src/core/hle/service/hid/controllers/npad.h
@@ -280,7 +280,6 @@ private:
Kernel::SharedPtr<Kernel::Event> styleset_changed_event;
std::size_t dump_idx{};
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{};
bool can_controllers_vibrate{true};