stubbed.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // Copyright 2018 yuzu emulator team
  2. // Licensed under GPLv2 or any later version
  3. // Refer to the license.txt file included.
  4. #pragma once
  5. #include "common/common_types.h"
  6. #include "core/hle/service/hid/controllers/controller_base.h"
  7. namespace Service::HID {
  8. class Controller_Stubbed final : public ControllerBase {
  9. public:
  10. explicit Controller_Stubbed(Core::System& system_);
  11. ~Controller_Stubbed() override;
  12. // Called when the controller is initialized
  13. void OnInit() override;
  14. // When the controller is released
  15. void OnRelease() override;
  16. // When the controller is requesting an update for the shared memory
  17. void OnUpdate(const Core::Timing::CoreTiming& core_timing, u8* data, std::size_t size) override;
  18. void SetCommonHeaderOffset(std::size_t off);
  19. private:
  20. struct CommonHeader {
  21. s64_le timestamp;
  22. s64_le total_entry_count;
  23. s64_le last_entry_index;
  24. s64_le entry_count;
  25. };
  26. static_assert(sizeof(CommonHeader) == 0x20, "CommonHeader is an invalid size");
  27. bool smart_update{};
  28. std::size_t common_offset{};
  29. };
  30. } // namespace Service::HID