diff options
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/hid/controllers/gesture.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/core/hle/service/hid/controllers/gesture.h b/src/core/hle/service/hid/controllers/gesture.h index 7a9d28dc6..c8edb35e1 100644 --- a/src/core/hle/service/hid/controllers/gesture.h +++ b/src/core/hle/service/hid/controllers/gesture.h @@ -14,7 +14,7 @@ namespace Service::HID { class Controller_Gesture final : public ControllerBase { public: - explicit Controller_Gesture(Core::HID::HIDCore& hid_core_); + explicit Controller_Gesture(Core::HID::HIDCore& hid_core_, u8* raw_shared_memory_); ~Controller_Gesture() override; // Called when the controller is initialized @@ -24,7 +24,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, size_t size) override; + void OnUpdate(const Core::Timing::CoreTiming& core_timing) override; private: static constexpr size_t MAX_FINGERS = 16; @@ -92,6 +92,14 @@ private: f32 angle{}; }; + struct GestureSharedMemory { + // This is nn::hid::detail::GestureLifo + Lifo<GestureState, hid_entry_count> gesture_lifo{}; + static_assert(sizeof(gesture_lifo) == 0x708, "gesture_lifo is an invalid size"); + INSERT_PADDING_WORDS(0x3E); + }; + static_assert(sizeof(GestureSharedMemory) == 0x800, "GestureSharedMemory is an invalid size"); + // Reads input from all available input engines void ReadTouchInput(); @@ -134,11 +142,8 @@ private: // Returns the average distance, angle and middle point of the active fingers GestureProperties GetGestureProperties(); - // This is nn::hid::detail::GestureLifo - Lifo<GestureState, hid_entry_count> gesture_lifo{}; - static_assert(sizeof(gesture_lifo) == 0x708, "gesture_lifo is an invalid size"); + GestureSharedMemory* shared_memory; GestureState next_state{}; - Core::HID::EmulatedConsole* console; std::array<Core::HID::TouchFinger, MAX_POINTS> fingers{}; |