diff options
| author | 2024-01-06 15:38:59 -0600 | |
|---|---|---|
| committer | 2024-01-06 15:38:59 -0600 | |
| commit | 12fd2ae86d78c69d5bce6ab5b5ba26a4b265ac92 (patch) | |
| tree | 3b95cbb74be05f0ce7a007353f1f9f95e1ed3901 /src/hid_core/hidbus/stubbed.cpp | |
| parent | Merge pull request #12437 from ameerj/gl-amd-fixes (diff) | |
| parent | hid_core: Move hid to it's own subproject (diff) | |
| download | yuzu-12fd2ae86d78c69d5bce6ab5b5ba26a4b265ac92.tar.gz yuzu-12fd2ae86d78c69d5bce6ab5b5ba26a4b265ac92.tar.xz yuzu-12fd2ae86d78c69d5bce6ab5b5ba26a4b265ac92.zip | |
Merge pull request #12582 from german77/hid-core
hid_core: Move hid to it's own subproject
Diffstat (limited to 'src/hid_core/hidbus/stubbed.cpp')
| -rw-r--r-- | src/hid_core/hidbus/stubbed.cpp | 50 |
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 | |||
| 8 | namespace Service::HID { | ||
| 9 | constexpr u8 DEVICE_ID = 0xFF; | ||
| 10 | |||
| 11 | HidbusStubbed::HidbusStubbed(Core::System& system_, KernelHelpers::ServiceContext& service_context_) | ||
| 12 | : HidbusBase(system_, service_context_) {} | ||
| 13 | HidbusStubbed::~HidbusStubbed() = default; | ||
| 14 | |||
| 15 | void HidbusStubbed::OnInit() { | ||
| 16 | return; | ||
| 17 | } | ||
| 18 | |||
| 19 | void HidbusStubbed::OnRelease() { | ||
| 20 | return; | ||
| 21 | }; | ||
| 22 | |||
| 23 | void 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 | |||
| 37 | u8 HidbusStubbed::GetDeviceId() const { | ||
| 38 | return DEVICE_ID; | ||
| 39 | } | ||
| 40 | |||
| 41 | std::vector<u8> HidbusStubbed::GetReply() const { | ||
| 42 | return {}; | ||
| 43 | } | ||
| 44 | |||
| 45 | bool HidbusStubbed::SetCommand(std::span<const u8> data) { | ||
| 46 | LOG_ERROR(Service_HID, "Command not implemented"); | ||
| 47 | return false; | ||
| 48 | } | ||
| 49 | |||
| 50 | } // namespace Service::HID | ||