yuzu-emu
/
yuzu-android
Archived
1
0
Fork 0

Update npad.cpp

This commit is contained in:
Morph1984 2019-09-04 02:42:58 -04:00 committed by GitHub
parent 1559477740
commit 5130b8a6a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -636,10 +636,15 @@ Controller_NPad::LedPattern Controller_NPad::GetLedPattern(u32 npad_id) {
return LedPattern{0, 0, 0, 0}; return LedPattern{0, 0, 0, 0};
}; };
} }
void Controller_NPad::SetVibrationEnabled(bool can_vibrate) { void Controller_NPad::SetVibrationEnabled(bool can_vibrate) {
can_controllers_vibrate = can_vibrate; can_controllers_vibrate = can_vibrate;
} }
bool Controller_NPad::IsVibrationEnabled() {
return can_controllers_vibrate;
}
void Controller_NPad::ClearAllConnectedControllers() { void Controller_NPad::ClearAllConnectedControllers() {
for (auto& controller : connected_controllers) { for (auto& controller : connected_controllers) {
if (controller.is_connected && controller.type != NPadControllerType::None) { if (controller.is_connected && controller.type != NPadControllerType::None) {
@ -648,6 +653,7 @@ void Controller_NPad::ClearAllConnectedControllers() {
} }
} }
} }
void Controller_NPad::DisconnectAllConnectedControllers() { void Controller_NPad::DisconnectAllConnectedControllers() {
std::for_each(connected_controllers.begin(), connected_controllers.end(), std::for_each(connected_controllers.begin(), connected_controllers.end(),
[](ControllerHolder& controller) { controller.is_connected = false; }); [](ControllerHolder& controller) { controller.is_connected = false; });