diff options
author | Narr the Reg <juangerman-13@hotmail.com> | 2023-01-26 18:21:04 +0100 |
---|---|---|
committer | Narr the Reg <juangerman-13@hotmail.com> | 2023-01-26 18:21:04 +0100 |
commit | 49707916db500e8225676a4caa4109f69d25faf3 (patch) | |
tree | 83aa03583c1a62fe0e86bfdb44e9e11b7d480a0d /src/input_common/helpers/joycon_protocol/generic_functions.cpp | |
parent | Revert 9617 and fix it on input_common (diff) | |
download | yuzu-49707916db500e8225676a4caa4109f69d25faf3.tar yuzu-49707916db500e8225676a4caa4109f69d25faf3.tar.gz yuzu-49707916db500e8225676a4caa4109f69d25faf3.tar.bz2 yuzu-49707916db500e8225676a4caa4109f69d25faf3.tar.lz yuzu-49707916db500e8225676a4caa4109f69d25faf3.tar.xz yuzu-49707916db500e8225676a4caa4109f69d25faf3.tar.zst yuzu-49707916db500e8225676a4caa4109f69d25faf3.zip |
Diffstat (limited to 'src/input_common/helpers/joycon_protocol/generic_functions.cpp')
-rw-r--r-- | src/input_common/helpers/joycon_protocol/generic_functions.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/input_common/helpers/joycon_protocol/generic_functions.cpp b/src/input_common/helpers/joycon_protocol/generic_functions.cpp index 52bb8b61a..63cfb1369 100644 --- a/src/input_common/helpers/joycon_protocol/generic_functions.cpp +++ b/src/input_common/helpers/joycon_protocol/generic_functions.cpp @@ -19,6 +19,17 @@ DriverResult GenericProtocol::EnableActiveMode() { return SetReportMode(ReportMode::STANDARD_FULL_60HZ); } +DriverResult GenericProtocol::SetLowPowerMode(bool enable) { + ScopedSetBlocking sb(this); + const std::array<u8, 1> buffer{static_cast<u8>(enable ? 1 : 0)}; + return SendSubCommand(SubCommand::LOW_POWER_MODE, buffer); +} + +DriverResult GenericProtocol::TriggersElapsed() { + ScopedSetBlocking sb(this); + return SendSubCommand(SubCommand::TRIGGERS_ELAPSED, {}); +} + DriverResult GenericProtocol::GetDeviceInfo(DeviceInfo& device_info) { ScopedSetBlocking sb(this); std::vector<u8> output; |