summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/hid/controllers
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2020-10-15 20:35:35 +0200
committerMorph <39850852+Morph1984@users.noreply.github.com>2020-11-16 05:33:20 +0100
commit92fa5257c762f631c64cbc8a60870af7deaf2ead (patch)
treefcddf1f601e75b391c246ac46b6d4591395e9dc8 /src/core/hle/service/hid/controllers
parentcontrollers/npad: Send an empty vibration on destruction/deactivation (diff)
downloadyuzu-92fa5257c762f631c64cbc8a60870af7deaf2ead.tar
yuzu-92fa5257c762f631c64cbc8a60870af7deaf2ead.tar.gz
yuzu-92fa5257c762f631c64cbc8a60870af7deaf2ead.tar.bz2
yuzu-92fa5257c762f631c64cbc8a60870af7deaf2ead.tar.lz
yuzu-92fa5257c762f631c64cbc8a60870af7deaf2ead.tar.xz
yuzu-92fa5257c762f631c64cbc8a60870af7deaf2ead.tar.zst
yuzu-92fa5257c762f631c64cbc8a60870af7deaf2ead.zip
Diffstat (limited to 'src/core/hle/service/hid/controllers')
-rw-r--r--src/core/hle/service/hid/controllers/npad.cpp10
-rw-r--r--src/core/hle/service/hid/controllers/npad.h3
2 files changed, 1 insertions, 12 deletions
diff --git a/src/core/hle/service/hid/controllers/npad.cpp b/src/core/hle/service/hid/controllers/npad.cpp
index 81725efbb..1fc06ef3f 100644
--- a/src/core/hle/service/hid/controllers/npad.cpp
+++ b/src/core/hle/service/hid/controllers/npad.cpp
@@ -694,7 +694,7 @@ void Controller_NPad::VibrateControllers(const std::vector<DeviceHandle>& vibrat
const std::vector<VibrationValue>& vibration_values) {
LOG_TRACE(Service_HID, "called");
- if (!Settings::values.vibration_enabled.GetValue() || !can_controllers_vibrate) {
+ if (!Settings::values.vibration_enabled.GetValue()) {
return;
}
@@ -924,14 +924,6 @@ void Controller_NPad::SetUnintendedHomeButtonInputProtectionEnabled(bool is_prot
unintended_home_button_input_protection[NPadIdToIndex(npad_id)] = is_protection_enabled;
}
-void Controller_NPad::SetVibrationEnabled(bool can_vibrate) {
- can_controllers_vibrate = can_vibrate;
-}
-
-bool Controller_NPad::IsVibrationEnabled() const {
- return can_controllers_vibrate;
-}
-
void Controller_NPad::ClearAllConnectedControllers() {
for (auto& controller : connected_controllers) {
if (controller.is_connected && controller.type != NPadControllerType::None) {
diff --git a/src/core/hle/service/hid/controllers/npad.h b/src/core/hle/service/hid/controllers/npad.h
index 4dc2a974d..576ef1558 100644
--- a/src/core/hle/service/hid/controllers/npad.h
+++ b/src/core/hle/service/hid/controllers/npad.h
@@ -173,8 +173,6 @@ public:
LedPattern GetLedPattern(u32 npad_id);
bool IsUnintendedHomeButtonInputProtectionEnabled(u32 npad_id) const;
void SetUnintendedHomeButtonInputProtectionEnabled(bool is_protection_enabled, u32 npad_id);
- void SetVibrationEnabled(bool can_vibrate);
- bool IsVibrationEnabled() const;
void ClearAllConnectedControllers();
void DisconnectAllConnectedControllers();
void ConnectAllDisconnectedControllers();
@@ -416,7 +414,6 @@ private:
std::array<ControllerHolder, 10> connected_controllers{};
std::array<bool, 10> unintended_home_button_input_protection{};
GyroscopeZeroDriftMode gyroscope_zero_drift_mode{GyroscopeZeroDriftMode::Standard};
- bool can_controllers_vibrate{true};
bool sixaxis_sensors_enabled{true};
bool sixaxis_at_rest{true};
std::array<ControllerPad, 10> npad_pad_states{};