btdrv-mitm: set dualshock4 state on initialize to make sure the controller is recognised quickly

This commit is contained in:
ndeadly 2020-08-07 23:30:27 +02:00
parent e0e999534f
commit 3a847c82d1
2 changed files with 8 additions and 0 deletions

View file

@ -20,6 +20,13 @@ namespace ams::controller {
}
Result Dualshock4Controller::initialize(void) {
R_TRY(FakeSwitchController::initialize());
R_TRY(this->updateControllerState());
return ams::ResultSuccess();
}
Result Dualshock4Controller::setPlayerLed(u8 led_mask) {
u8 i = 0;
while (led_mask >>= 1) { ++i; }

View file

@ -116,6 +116,7 @@ namespace ams::controller {
Dualshock4Controller(const bluetooth::Address *address)
: FakeSwitchController(ControllerType_Dualshock4, address), m_ledColour({0, 0, 0}) { };
Result initialize(void);
Result setPlayerLed(u8 led_mask);
Result setLightbarColour(Dualshock4LedColour colour);