diff options
author | Narr the Reg <juangerman-13@hotmail.com> | 2022-04-19 22:30:32 +0200 |
---|---|---|
committer | Narr the Reg <juangerman-13@hotmail.com> | 2022-04-23 22:41:42 +0200 |
commit | 61582efeb976b0852e73b734835d60c73b38f3cf (patch) | |
tree | b5ac72746de0533cd292ad5cb962d0e663326b0e /src/core/hle/service/hid/controllers/xpad.h | |
parent | Merge pull request #8249 from german77/queued (diff) | |
download | yuzu-61582efeb976b0852e73b734835d60c73b38f3cf.tar yuzu-61582efeb976b0852e73b734835d60c73b38f3cf.tar.gz yuzu-61582efeb976b0852e73b734835d60c73b38f3cf.tar.bz2 yuzu-61582efeb976b0852e73b734835d60c73b38f3cf.tar.lz yuzu-61582efeb976b0852e73b734835d60c73b38f3cf.tar.xz yuzu-61582efeb976b0852e73b734835d60c73b38f3cf.tar.zst yuzu-61582efeb976b0852e73b734835d60c73b38f3cf.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/hid/controllers/xpad.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/core/hle/service/hid/controllers/xpad.h b/src/core/hle/service/hid/controllers/xpad.h index 8211b6ee3..7ed8d5d97 100644 --- a/src/core/hle/service/hid/controllers/xpad.h +++ b/src/core/hle/service/hid/controllers/xpad.h @@ -12,7 +12,7 @@ namespace Service::HID { class Controller_XPad final : public ControllerBase { public: - explicit Controller_XPad(Core::HID::HIDCore& hid_core_); + explicit Controller_XPad(Core::HID::HIDCore& hid_core_, u8* raw_shared_memory_); ~Controller_XPad() override; // Called when the controller is initialized @@ -22,7 +22,7 @@ public: void OnRelease() override; // When the controller is requesting an update for the shared memory - void OnUpdate(const Core::Timing::CoreTiming& core_timing, u8* data, std::size_t size) override; + void OnUpdate(const Core::Timing::CoreTiming& core_timing) override; private: // This is nn::hid::BasicXpadAttributeSet @@ -98,9 +98,15 @@ private: }; static_assert(sizeof(BasicXpadState) == 0x20, "BasicXpadState is an invalid size"); - // This is nn::hid::detail::BasicXpadLifo - Lifo<BasicXpadState, hid_entry_count> basic_xpad_lifo{}; - static_assert(sizeof(basic_xpad_lifo) == 0x2C8, "basic_xpad_lifo is an invalid size"); + struct XpadSharedMemory { + // This is nn::hid::detail::BasicXpadLifo + Lifo<BasicXpadState, hid_entry_count> basic_xpad_lifo{}; + static_assert(sizeof(basic_xpad_lifo) == 0x2C8, "basic_xpad_lifo is an invalid size"); + INSERT_PADDING_WORDS(0x4E); + }; + static_assert(sizeof(XpadSharedMemory) == 0x400, "XpadSharedMemory is an invalid size"); + + XpadSharedMemory* shared_memory; BasicXpadState next_state{}; }; } // namespace Service::HID |