blob: e477443e3087a551c63e6f67f82f91bc5788b038 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#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
|