diff options
author | Ameer <aj662@drexel.edu> | 2020-06-23 23:37:15 +0200 |
---|---|---|
committer | Ameer <aj662@drexel.edu> | 2020-06-23 23:37:15 +0200 |
commit | 743e1f02a06187164d55f4208b8e85742abd4498 (patch) | |
tree | 6eeeaddbc7cc3dac770c1d2efada1f4e68394939 /src/input_common/gcadapter/gc_adapter.h | |
parent | Fix deallocation of GC Adapter (diff) | |
download | yuzu-743e1f02a06187164d55f4208b8e85742abd4498.tar yuzu-743e1f02a06187164d55f4208b8e85742abd4498.tar.gz yuzu-743e1f02a06187164d55f4208b8e85742abd4498.tar.bz2 yuzu-743e1f02a06187164d55f4208b8e85742abd4498.tar.lz yuzu-743e1f02a06187164d55f4208b8e85742abd4498.tar.xz yuzu-743e1f02a06187164d55f4208b8e85742abd4498.tar.zst yuzu-743e1f02a06187164d55f4208b8e85742abd4498.zip |
Diffstat (limited to '')
-rw-r--r-- | src/input_common/gcadapter/gc_adapter.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/input_common/gcadapter/gc_adapter.h b/src/input_common/gcadapter/gc_adapter.h index 7aed0b480..abfe0d7b3 100644 --- a/src/input_common/gcadapter/gc_adapter.h +++ b/src/input_common/gcadapter/gc_adapter.h @@ -37,6 +37,12 @@ enum PadButton { }; +/// Used to loop through the and assign button in poller +static constexpr std::array<PadButton, 12> PadButtonArray{ + PAD_BUTTON_LEFT, PAD_BUTTON_RIGHT, PAD_BUTTON_DOWN, PAD_BUTTON_UP, + PAD_TRIGGER_Z, PAD_TRIGGER_R, PAD_TRIGGER_L, PAD_BUTTON_A, + PAD_BUTTON_B, PAD_BUTTON_X, PAD_BUTTON_Y, PAD_BUTTON_START}; + enum class PadAxes : u8 { StickX, StickY, @@ -100,7 +106,7 @@ public: const std::array<GCState, 4>& GetPadState() const; private: - GCPadStatus CheckStatus(int port, const std::array<u8, 37>& adapter_payload); + GCPadStatus GetPadStatus(int port, const std::array<u8, 37>& adapter_payload); void PadToState(const GCPadStatus& pad, GCState& state); |