diff options
| author | 2023-01-26 10:56:31 -0800 | |
|---|---|---|
| committer | 2023-01-26 10:56:31 -0800 | |
| commit | 7d0a77a825ff16fc3449cd32d436107507e19ae8 (patch) | |
| tree | 96c6269e01338fe630d03af62ccbd983632bce0c /src/input_common/helpers/joycon_protocol/generic_functions.cpp | |
| parent | Merge pull request #9670 from merryhime/revert-af5ecb0b15d4449f58434e70eed835... (diff) | |
| parent | input_common: Implement SetLowPowerMode and TriggersElapsed for the joycon dr... (diff) | |
| download | yuzu-7d0a77a825ff16fc3449cd32d436107507e19ae8.tar.gz yuzu-7d0a77a825ff16fc3449cd32d436107507e19ae8.tar.xz yuzu-7d0a77a825ff16fc3449cd32d436107507e19ae8.zip | |
Merge pull request #9683 from german77/high_power_joycon
input_common: Implement SetLowPowerMode and TriggersElapsed
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() { | |||
| 19 | return SetReportMode(ReportMode::STANDARD_FULL_60HZ); | 19 | return SetReportMode(ReportMode::STANDARD_FULL_60HZ); |
| 20 | } | 20 | } |
| 21 | 21 | ||
| 22 | DriverResult GenericProtocol::SetLowPowerMode(bool enable) { | ||
| 23 | ScopedSetBlocking sb(this); | ||
| 24 | const std::array<u8, 1> buffer{static_cast<u8>(enable ? 1 : 0)}; | ||
| 25 | return SendSubCommand(SubCommand::LOW_POWER_MODE, buffer); | ||
| 26 | } | ||
| 27 | |||
| 28 | DriverResult GenericProtocol::TriggersElapsed() { | ||
| 29 | ScopedSetBlocking sb(this); | ||
| 30 | return SendSubCommand(SubCommand::TRIGGERS_ELAPSED, {}); | ||
| 31 | } | ||
| 32 | |||
| 22 | DriverResult GenericProtocol::GetDeviceInfo(DeviceInfo& device_info) { | 33 | DriverResult GenericProtocol::GetDeviceInfo(DeviceInfo& device_info) { |
| 23 | ScopedSetBlocking sb(this); | 34 | ScopedSetBlocking sb(this); |
| 24 | std::vector<u8> output; | 35 | std::vector<u8> output; |