summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/hid/controllers/gesture.h
diff options
context:
space:
mode:
authorNarr the Reg <juangerman-13@hotmail.com>2022-04-19 22:30:32 +0200
committerNarr the Reg <juangerman-13@hotmail.com>2022-04-23 22:41:42 +0200
commit61582efeb976b0852e73b734835d60c73b38f3cf (patch)
treeb5ac72746de0533cd292ad5cb962d0e663326b0e /src/core/hle/service/hid/controllers/gesture.h
parentMerge pull request #8249 from german77/queued (diff)
downloadyuzu-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 'src/core/hle/service/hid/controllers/gesture.h')
-rw-r--r--src/core/hle/service/hid/controllers/gesture.h17
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{};