diff options
author | David Marcec <dmarcecguzman@gmail.com> | 2018-10-10 12:38:43 +0200 |
---|---|---|
committer | David Marcec <dmarcecguzman@gmail.com> | 2018-10-10 12:38:43 +0200 |
commit | 3d75c9cd7a75f7ef97e2e14fc2eb15e4bba92934 (patch) | |
tree | a4fd0d5c6ed5e11fa5eb0229b9dd9ab4e06885de /src/core/hle/service/hid/controllers/npad.h | |
parent | Kirby expects handheld controllers to be at position 8 (diff) | |
download | yuzu-3d75c9cd7a75f7ef97e2e14fc2eb15e4bba92934.tar yuzu-3d75c9cd7a75f7ef97e2e14fc2eb15e4bba92934.tar.gz yuzu-3d75c9cd7a75f7ef97e2e14fc2eb15e4bba92934.tar.bz2 yuzu-3d75c9cd7a75f7ef97e2e14fc2eb15e4bba92934.tar.lz yuzu-3d75c9cd7a75f7ef97e2e14fc2eb15e4bba92934.tar.xz yuzu-3d75c9cd7a75f7ef97e2e14fc2eb15e4bba92934.tar.zst yuzu-3d75c9cd7a75f7ef97e2e14fc2eb15e4bba92934.zip |
Diffstat (limited to 'src/core/hle/service/hid/controllers/npad.h')
-rw-r--r-- | src/core/hle/service/hid/controllers/npad.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/core/hle/service/hid/controllers/npad.h b/src/core/hle/service/hid/controllers/npad.h index 86ab0e429..28c89768c 100644 --- a/src/core/hle/service/hid/controllers/npad.h +++ b/src/core/hle/service/hid/controllers/npad.h @@ -65,12 +65,29 @@ public: None, ProController, Handheld, + HandheldVariant, // Games which require the handheld controller to be at index 8 JoyLeft, JoyRight, Tabletop, Pokeball, }; + struct LedPattern { + explicit LedPattern(u64 light1, u64 light2, u64 light3, u64 light4) { + position1.Assign(light1); + position1.Assign(light2); + position1.Assign(light3); + position1.Assign(light4); + }; + union { + u64 raw{}; + BitField<0, 1, u64> position1; + BitField<1, 1, u64> position2; + BitField<2, 1, u64> position3; + BitField<3, 1, u64> position4; + }; + }; + void SetSupportedStyleSet(NPadType style_set); NPadType GetSupportedStyleSet() const; @@ -93,6 +110,7 @@ public: void ConnectNPad(u32 npad_id); void DisconnectNPad(u32 npad_id); + LedPattern GetLedPattern(u32 npad_id); private: struct CommonHeader { @@ -255,8 +273,8 @@ private: std::size_t dump_idx{}; Vibration last_processed_vibration{}; std::size_t controller_count{}; - static constexpr std::array<u32, 9> npad_id_list{0, 1, 2, 3, 4, 5, 6, 7, 32}; - std::array<ControllerHolder, 9> connected_controllers{}; + 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{}; void InitNewlyAddedControler(std::size_t controller_idx); }; |