diff options
author | bunnei <bunneidev@gmail.com> | 2020-07-16 17:40:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-16 17:40:09 +0200 |
commit | a89dfc9183347be638f49f8d9ca4d0f38ca9de76 (patch) | |
tree | 3c01f62ddd0b416ced79f288736e0d1fa9b6a586 /src/input_common/gcadapter/gc_adapter.h | |
parent | Merge pull request #4337 from lat9nq/fix-per-game-async (diff) | |
parent | Rebase to master (diff) | |
download | yuzu-a89dfc9183347be638f49f8d9ca4d0f38ca9de76.tar yuzu-a89dfc9183347be638f49f8d9ca4d0f38ca9de76.tar.gz yuzu-a89dfc9183347be638f49f8d9ca4d0f38ca9de76.tar.bz2 yuzu-a89dfc9183347be638f49f8d9ca4d0f38ca9de76.tar.lz yuzu-a89dfc9183347be638f49f8d9ca4d0f38ca9de76.tar.xz yuzu-a89dfc9183347be638f49f8d9ca4d0f38ca9de76.tar.zst yuzu-a89dfc9183347be638f49f8d9ca4d0f38ca9de76.zip |
Diffstat (limited to '')
-rw-r--r-- | src/input_common/gcadapter/gc_adapter.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/input_common/gcadapter/gc_adapter.h b/src/input_common/gcadapter/gc_adapter.h index e2cdd6255..3586c8bda 100644 --- a/src/input_common/gcadapter/gc_adapter.h +++ b/src/input_common/gcadapter/gc_adapter.h @@ -17,12 +17,6 @@ struct libusb_device_handle; namespace GCAdapter { -enum { - PAD_USE_ORIGIN = 0x0080, - PAD_GET_ORIGIN = 0x2000, - PAD_ERR_STATUS = 0x8000, -}; - enum class PadButton { PAD_BUTTON_LEFT = 0x0001, PAD_BUTTON_RIGHT = 0x0002, @@ -109,6 +103,8 @@ public: std::array<GCState, 4>& GetPadState(); const std::array<GCState, 4>& GetPadState() const; + int GetOriginValue(int port, int axis) const; + private: GCPadStatus GetPadStatus(std::size_t port, const std::array<u8, 37>& adapter_payload); @@ -159,6 +155,8 @@ private: std::array<Common::SPSCQueue<GCPadStatus>, 4> pad_queue; std::array<GCState, 4> state; + std::array<bool, 4> get_origin; + std::array<GCPadStatus, 4> origin_status; }; } // namespace GCAdapter |