summaryrefslogtreecommitdiff
path: root/src/core/hid
diff options
context:
space:
mode:
authorGravatar german772021-06-16 22:09:38 -0500
committerGravatar Narr the Reg2022-02-08 10:08:04 -0600
commitfc9abd3c625c3eb8b7cc9445eef1291744ee52f6 (patch)
treedd69bcaaafcfd4e4e3fed2bb38f0674bd2720294 /src/core/hid
parentnfp: Move IUser class to header and add missing enum and structs (diff)
downloadyuzu-fc9abd3c625c3eb8b7cc9445eef1291744ee52f6.tar.gz
yuzu-fc9abd3c625c3eb8b7cc9445eef1291744ee52f6.tar.xz
yuzu-fc9abd3c625c3eb8b7cc9445eef1291744ee52f6.zip
nfp: Improve implementation
Diffstat (limited to 'src/core/hid')
-rw-r--r--src/core/hid/emulated_controller.cpp6
-rw-r--r--src/core/hid/emulated_controller.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/src/core/hid/emulated_controller.cpp b/src/core/hid/emulated_controller.cpp
index a7cdf45e6..61ceea629 100644
--- a/src/core/hid/emulated_controller.cpp
+++ b/src/core/hid/emulated_controller.cpp
@@ -884,6 +884,12 @@ bool EmulatedController::TestVibration(std::size_t device_index) {
884 return SetVibration(device_index, DEFAULT_VIBRATION_VALUE); 884 return SetVibration(device_index, DEFAULT_VIBRATION_VALUE);
885} 885}
886 886
887bool EmulatedController::SetPollingMode(Common::Input::PollingMode polling_mode) {
888 LOG_INFO(Service_HID, "Set polling mode {}", polling_mode);
889 auto& output_device = output_devices[static_cast<std::size_t>(DeviceIndex::Right)];
890 return output_device->SetPollingMode(polling_mode) == Common::Input::PollingError::None;
891}
892
887void EmulatedController::SetLedPattern() { 893void EmulatedController::SetLedPattern() {
888 for (auto& device : output_devices) { 894 for (auto& device : output_devices) {
889 if (!device) { 895 if (!device) {
diff --git a/src/core/hid/emulated_controller.h b/src/core/hid/emulated_controller.h
index d8642c5b3..7785e6110 100644
--- a/src/core/hid/emulated_controller.h
+++ b/src/core/hid/emulated_controller.h
@@ -309,6 +309,8 @@ public:
309 */ 309 */
310 bool TestVibration(std::size_t device_index); 310 bool TestVibration(std::size_t device_index);
311 311
312 bool SetPollingMode(Common::Input::PollingMode polling_mode);
313
312 /// Returns the led pattern corresponding to this emulated controller 314 /// Returns the led pattern corresponding to this emulated controller
313 LedPattern GetLedPattern() const; 315 LedPattern GetLedPattern() const;
314 316