summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMorph1984 <39850852+Morph1984@users.noreply.github.com>2019-09-04 08:42:58 +0200
committerGitHub <noreply@github.com>2019-09-04 08:42:58 +0200
commit5130b8a6a919d711e558f8ab7bd03655a38d3f09 (patch)
treee126e17189927588f039a1ed15c0958b9517e76b /src
parentUpdate hid.h (diff)
downloadyuzu-5130b8a6a919d711e558f8ab7bd03655a38d3f09.tar
yuzu-5130b8a6a919d711e558f8ab7bd03655a38d3f09.tar.gz
yuzu-5130b8a6a919d711e558f8ab7bd03655a38d3f09.tar.bz2
yuzu-5130b8a6a919d711e558f8ab7bd03655a38d3f09.tar.lz
yuzu-5130b8a6a919d711e558f8ab7bd03655a38d3f09.tar.xz
yuzu-5130b8a6a919d711e558f8ab7bd03655a38d3f09.tar.zst
yuzu-5130b8a6a919d711e558f8ab7bd03655a38d3f09.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/hid/controllers/npad.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/hle/service/hid/controllers/npad.cpp b/src/core/hle/service/hid/controllers/npad.cpp
index 1e81f776f..eb44b6026 100644
--- a/src/core/hle/service/hid/controllers/npad.cpp
+++ b/src/core/hle/service/hid/controllers/npad.cpp
@@ -636,10 +636,15 @@ Controller_NPad::LedPattern Controller_NPad::GetLedPattern(u32 npad_id) {
return LedPattern{0, 0, 0, 0};
};
}
+
void Controller_NPad::SetVibrationEnabled(bool can_vibrate) {
can_controllers_vibrate = can_vibrate;
}
+bool Controller_NPad::IsVibrationEnabled() {
+ return can_controllers_vibrate;
+}
+
void Controller_NPad::ClearAllConnectedControllers() {
for (auto& controller : connected_controllers) {
if (controller.is_connected && controller.type != NPadControllerType::None) {
@@ -648,6 +653,7 @@ void Controller_NPad::ClearAllConnectedControllers() {
}
}
}
+
void Controller_NPad::DisconnectAllConnectedControllers() {
std::for_each(connected_controllers.begin(), connected_controllers.end(),
[](ControllerHolder& controller) { controller.is_connected = false; });