summaryrefslogtreecommitdiff
path: root/src/hid_core/hidbus/stubbed.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/hid_core/hidbus/stubbed.cpp')
-rw-r--r--src/hid_core/hidbus/stubbed.cpp50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/hid_core/hidbus/stubbed.cpp b/src/hid_core/hidbus/stubbed.cpp
new file mode 100644
index 000000000..f16051aa9
--- /dev/null
+++ b/src/hid_core/hidbus/stubbed.cpp
@@ -0,0 +1,50 @@
1// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#include "hid_core/frontend/emulated_controller.h"
5#include "hid_core/hid_core.h"
6#include "hid_core/hidbus/stubbed.h"
7
8namespace Service::HID {
9constexpr u8 DEVICE_ID = 0xFF;
10
11HidbusStubbed::HidbusStubbed(Core::System& system_, KernelHelpers::ServiceContext& service_context_)
12 : HidbusBase(system_, service_context_) {}
13HidbusStubbed::~HidbusStubbed() = default;
14
15void HidbusStubbed::OnInit() {
16 return;
17}
18
19void HidbusStubbed::OnRelease() {
20 return;
21};
22
23void HidbusStubbed::OnUpdate() {
24 if (!is_activated) {
25 return;
26 }
27 if (!device_enabled) {
28 return;
29 }
30 if (!polling_mode_enabled || transfer_memory == 0) {
31 return;
32 }
33
34 LOG_ERROR(Service_HID, "Polling mode not supported {}", polling_mode);
35}
36
37u8 HidbusStubbed::GetDeviceId() const {
38 return DEVICE_ID;
39}
40
41std::vector<u8> HidbusStubbed::GetReply() const {
42 return {};
43}
44
45bool HidbusStubbed::SetCommand(std::span<const u8> data) {
46 LOG_ERROR(Service_HID, "Command not implemented");
47 return false;
48}
49
50} // namespace Service::HID