summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/hid/controllers/controller_base.h
diff options
context:
space:
mode:
authorFernando S <fsahmkow27@gmail.com>2021-11-27 11:52:08 +0100
committerGitHub <noreply@github.com>2021-11-27 11:52:08 +0100
commit564f10527745f870621c08bbb5d16badee0ed861 (patch)
treee8ac8dee60086facf1837393882865f5df18c95e /src/core/hle/service/hid/controllers/controller_base.h
parentMerge pull request #7431 from liushuyu/fix-linux-decoding (diff)
parentconfig: Remove vibration configuration (diff)
downloadyuzu-564f10527745f870621c08bbb5d16badee0ed861.tar
yuzu-564f10527745f870621c08bbb5d16badee0ed861.tar.gz
yuzu-564f10527745f870621c08bbb5d16badee0ed861.tar.bz2
yuzu-564f10527745f870621c08bbb5d16badee0ed861.tar.lz
yuzu-564f10527745f870621c08bbb5d16badee0ed861.tar.xz
yuzu-564f10527745f870621c08bbb5d16badee0ed861.tar.zst
yuzu-564f10527745f870621c08bbb5d16badee0ed861.zip
Diffstat (limited to 'src/core/hle/service/hid/controllers/controller_base.h')
-rw-r--r--src/core/hle/service/hid/controllers/controller_base.h21
1 files changed, 6 insertions, 15 deletions
diff --git a/src/core/hle/service/hid/controllers/controller_base.h b/src/core/hle/service/hid/controllers/controller_base.h
index 1556fb08e..7450eb20a 100644
--- a/src/core/hle/service/hid/controllers/controller_base.h
+++ b/src/core/hle/service/hid/controllers/controller_base.h
@@ -11,14 +11,14 @@ namespace Core::Timing {
class CoreTiming;
}
-namespace Core {
-class System;
+namespace Core::HID {
+class HIDCore;
}
namespace Service::HID {
class ControllerBase {
public:
- explicit ControllerBase(Core::System& system_);
+ explicit ControllerBase(Core::HID::HIDCore& hid_core_);
virtual ~ControllerBase();
// Called when the controller is initialized
@@ -35,26 +35,17 @@ public:
virtual void OnMotionUpdate(const Core::Timing::CoreTiming& core_timing, u8* data,
std::size_t size) {}
- // Called when input devices should be loaded
- virtual void OnLoadInputDevices() = 0;
-
void ActivateController();
void DeactivateController();
bool IsControllerActivated() const;
+ static const std::size_t hid_entry_count = 17;
+
protected:
bool is_activated{false};
- struct CommonHeader {
- s64_le timestamp;
- s64_le total_entry_count;
- s64_le last_entry_index;
- s64_le entry_count;
- };
- static_assert(sizeof(CommonHeader) == 0x20, "CommonHeader is an invalid size");
-
- Core::System& system;
+ Core::HID::HIDCore& hid_core;
};
} // namespace Service::HID