mouse.h 948 B

12345678910111213141516171819202122232425262728293031323334
  1. // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #pragma once
  4. #include "core/hle/service/hid/controllers/controller_base.h"
  5. namespace Core::HID {
  6. class EmulatedDevices;
  7. struct MouseState;
  8. struct AnalogStickState;
  9. } // namespace Core::HID
  10. namespace Service::HID {
  11. class Mouse final : public ControllerBase {
  12. public:
  13. explicit Mouse(Core::HID::HIDCore& hid_core_);
  14. ~Mouse() override;
  15. // Called when the controller is initialized
  16. void OnInit() override;
  17. // When the controller is released
  18. void OnRelease() override;
  19. // When the controller is requesting an update for the shared memory
  20. void OnUpdate(const Core::Timing::CoreTiming& core_timing) override;
  21. private:
  22. Core::HID::MouseState next_state{};
  23. Core::HID::AnalogStickState last_mouse_wheel_state{};
  24. Core::HID::EmulatedDevices* emulated_devices = nullptr;
  25. };
  26. } // namespace Service::HID