aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/service/hid/hidbus/stubbed.cpp
diff options
context:
space:
mode:
authorFernando S <fsahmkow27@gmail.com>2022-04-16 15:51:14 +0200
committerGitHub <noreply@github.com>2022-04-16 15:51:14 +0200
commitfd49b186fa13c74a61cdf70844486c75cfc0c930 (patch)
treeaff4d01b4a955e7928ed97cb979d80b596d013f3 /src/core/hle/service/hid/hidbus/stubbed.cpp
parenta29a8c6f7840182f6fd661052e09a6b52a47e386 (diff)
parent46e1c5bc373734e29842ad1781a1ff266a4cd43d (diff)
Merge pull request #6558 from german77/ringcon2
hidbus: Implement hidbus and ringcon
Diffstat (limited to 'src/core/hle/service/hid/hidbus/stubbed.cpp')
-rw-r--r--src/core/hle/service/hid/hidbus/stubbed.cpp52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/core/hle/service/hid/hidbus/stubbed.cpp b/src/core/hle/service/hid/hidbus/stubbed.cpp
new file mode 100644
index 000000000..5474657be
--- /dev/null
+++ b/src/core/hle/service/hid/hidbus/stubbed.cpp
@@ -0,0 +1,52 @@
+// Copyright 2021 yuzu Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#include "core/hid/emulated_controller.h"
+#include "core/hid/hid_core.h"
+#include "core/hle/service/hid/hidbus/stubbed.h"
+
+namespace Service::HID {
+constexpr u8 DEVICE_ID = 0xFF;
+
+HidbusStubbed::HidbusStubbed(Core::HID::HIDCore& hid_core_,
+ KernelHelpers::ServiceContext& service_context_)
+ : HidbusBase(service_context_) {}
+HidbusStubbed::~HidbusStubbed() = default;
+
+void HidbusStubbed::OnInit() {
+ return;
+}
+
+void HidbusStubbed::OnRelease() {
+ return;
+};
+
+void HidbusStubbed::OnUpdate() {
+ if (!is_activated) {
+ return;
+ }
+ if (!device_enabled) {
+ return;
+ }
+ if (!polling_mode_enabled || !is_transfer_memory_set) {
+ return;
+ }
+
+ LOG_ERROR(Service_HID, "Polling mode not supported {}", polling_mode);
+}
+
+u8 HidbusStubbed::GetDeviceId() const {
+ return DEVICE_ID;
+}
+
+std::vector<u8> HidbusStubbed::GetReply() const {
+ return {};
+}
+
+bool HidbusStubbed::SetCommand(const std::vector<u8>& data) {
+ LOG_ERROR(Service_HID, "Command not implemented");
+ return false;
+}
+
+} // namespace Service::HID