input_common: Implement SetLowPowerMode and TriggersElapsed for the joycon driver

This commit is contained in:
Narr the Reg
2023-01-26 11:21:04 -06:00
parent cc821bfae1
commit 49707916db
4 changed files with 21 additions and 0 deletions

View File

@ -86,6 +86,7 @@ DriverResult JoyconDriver::InitializeDevice() {
// Get fixed joycon info
generic_protocol->GetVersionNumber(version);
generic_protocol->SetLowPowerMode(false);
generic_protocol->GetColor(color);
if (handle_device_type == ControllerType::Pro) {
// Some 3rd party controllers aren't pro controllers
@ -324,6 +325,8 @@ DriverResult JoyconDriver::SetPollingMode() {
if (result != DriverResult::Success) {
LOG_ERROR(Input, "Error enabling active mode");
}
// Switch calls this function after enabling active mode
generic_protocol->TriggersElapsed();
disable_input_thread = false;
return result;