summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/hid/controllers/mouse.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/service/hid/controllers/mouse.h')
-rw-r--r--src/core/hle/service/hid/controllers/mouse.h21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/core/hle/service/hid/controllers/mouse.h b/src/core/hle/service/hid/controllers/mouse.h
index 62acdfb77..733d00577 100644
--- a/src/core/hle/service/hid/controllers/mouse.h
+++ b/src/core/hle/service/hid/controllers/mouse.h
@@ -16,7 +16,7 @@ struct AnalogStickState;
namespace Service::HID {
class Controller_Mouse final : public ControllerBase {
public:
- explicit Controller_Mouse(Core::HID::HIDCore& hid_core_);
+ explicit Controller_Mouse(Core::HID::HIDCore& hid_core_, u8* raw_shared_memory_);
~Controller_Mouse() override;
// Called when the controller is initialized
@@ -26,15 +26,20 @@ 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::detail::MouseLifo
- Lifo<Core::HID::MouseState, hid_entry_count> mouse_lifo{};
- static_assert(sizeof(mouse_lifo) == 0x350, "mouse_lifo is an invalid size");
- Core::HID::MouseState next_state{};
+ struct MouseSharedMemory {
+ // This is nn::hid::detail::MouseLifo
+ Lifo<Core::HID::MouseState, hid_entry_count> mouse_lifo{};
+ static_assert(sizeof(mouse_lifo) == 0x350, "mouse_lifo is an invalid size");
+ INSERT_PADDING_WORDS(0x2C);
+ };
+ static_assert(sizeof(MouseSharedMemory) == 0x400, "MouseSharedMemory is an invalid size");
- Core::HID::AnalogStickState last_mouse_wheel_state;
- Core::HID::EmulatedDevices* emulated_devices;
+ Core::HID::MouseState next_state{};
+ Core::HID::AnalogStickState last_mouse_wheel_state{};
+ MouseSharedMemory* shared_memory = nullptr;
+ Core::HID::EmulatedDevices* emulated_devices = nullptr;
};
} // namespace Service::HID