mirror of
https://github.com/ndeadly/MissionControl
synced 2024-11-26 22:30:21 +00:00
btdrv-mitm: make use of auto keyword in controller identification loops
This commit is contained in:
parent
4ab452d382
commit
800388032b
1 changed files with 6 additions and 6 deletions
|
@ -303,37 +303,37 @@ namespace ams::mitm::btdrv {
|
||||||
|
|
||||||
controller::ControllerType identifyController(uint16_t vid, uint16_t pid) {
|
controller::ControllerType identifyController(uint16_t vid, uint16_t pid) {
|
||||||
|
|
||||||
for (controller::HardwareID hwId : controller::JoyconController::hardwareIds) {
|
for (auto hwId : controller::JoyconController::hardwareIds) {
|
||||||
if ( (vid == hwId.vid) && (pid == hwId.pid) ) {
|
if ( (vid == hwId.vid) && (pid == hwId.pid) ) {
|
||||||
return controller::ControllerType_Joycon;
|
return controller::ControllerType_Joycon;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (controller::HardwareID hwId : controller::SwitchProController::hardwareIds) {
|
for (auto hwId : controller::SwitchProController::hardwareIds) {
|
||||||
if ( (vid == hwId.vid) && (pid == hwId.pid) ) {
|
if ( (vid == hwId.vid) && (pid == hwId.pid) ) {
|
||||||
return controller::ControllerType_SwitchPro;
|
return controller::ControllerType_SwitchPro;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (controller::HardwareID hwId : controller::WiiUProController::hardwareIds) {
|
for (auto hwId : controller::WiiUProController::hardwareIds) {
|
||||||
if ( (vid == hwId.vid) && (pid == hwId.pid) ) {
|
if ( (vid == hwId.vid) && (pid == hwId.pid) ) {
|
||||||
return controller::ControllerType_WiiUPro;
|
return controller::ControllerType_WiiUPro;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (controller::HardwareID hwId : controller::WiimoteController::hardwareIds) {
|
for (auto hwId : controller::WiimoteController::hardwareIds) {
|
||||||
if ( (vid == hwId.vid) && (pid == hwId.pid) ) {
|
if ( (vid == hwId.vid) && (pid == hwId.pid) ) {
|
||||||
return controller::ControllerType_Wiimote;
|
return controller::ControllerType_Wiimote;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (controller::HardwareID hwId : controller::Dualshock4Controller::hardwareIds) {
|
for (auto hwId : controller::Dualshock4Controller::hardwareIds) {
|
||||||
if ( (vid == hwId.vid) && (pid == hwId.pid) ) {
|
if ( (vid == hwId.vid) && (pid == hwId.pid) ) {
|
||||||
return controller::ControllerType_Dualshock4;
|
return controller::ControllerType_Dualshock4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (controller::HardwareID hwId : controller::XboxOneController::hardwareIds) {
|
for (auto hwId : controller::XboxOneController::hardwareIds) {
|
||||||
if ( (vid == hwId.vid) && (pid == hwId.pid) ) {
|
if ( (vid == hwId.vid) && (pid == hwId.pid) ) {
|
||||||
return controller::ControllerType_XboxOne;
|
return controller::ControllerType_XboxOne;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue