summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/hid/controllers
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2021-04-08 09:41:06 +0200
committerMorph <39850852+Morph1984@users.noreply.github.com>2021-04-08 09:41:06 +0200
commit8e545deab934480706b4767bc15773921a9fa4e8 (patch)
treeee2d44af3e703c726477c03d44af962e43414186 /src/core/hle/service/hid/controllers
parentMerge pull request #6160 from Morph1984/fs-update-12.x (diff)
downloadyuzu-8e545deab934480706b4767bc15773921a9fa4e8.tar
yuzu-8e545deab934480706b4767bc15773921a9fa4e8.tar.gz
yuzu-8e545deab934480706b4767bc15773921a9fa4e8.tar.bz2
yuzu-8e545deab934480706b4767bc15773921a9fa4e8.tar.lz
yuzu-8e545deab934480706b4767bc15773921a9fa4e8.tar.xz
yuzu-8e545deab934480706b4767bc15773921a9fa4e8.tar.zst
yuzu-8e545deab934480706b4767bc15773921a9fa4e8.zip
Diffstat (limited to 'src/core/hle/service/hid/controllers')
-rw-r--r--src/core/hle/service/hid/controllers/npad.cpp4
-rw-r--r--src/core/hle/service/hid/controllers/npad.h2
2 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 1df62f98e..673db68c7 100644
--- a/src/core/hle/service/hid/controllers/npad.cpp
+++ b/src/core/hle/service/hid/controllers/npad.cpp
@@ -1138,6 +1138,10 @@ void Controller_NPad::SetUnintendedHomeButtonInputProtectionEnabled(bool is_prot
unintended_home_button_input_protection[NPadIdToIndex(npad_id)] = is_protection_enabled;
}
+void Controller_NPad::SetAnalogStickUseCenterClamp(bool use_center_clamp) {
+ analog_stick_use_center_clamp = use_center_clamp;
+}
+
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 bc2e6779d..873a0a1e2 100644
--- a/src/core/hle/service/hid/controllers/npad.h
+++ b/src/core/hle/service/hid/controllers/npad.h
@@ -219,6 +219,7 @@ public:
LedPattern GetLedPattern(u32 npad_id);
bool IsUnintendedHomeButtonInputProtectionEnabled(u32 npad_id) const;
void SetUnintendedHomeButtonInputProtectionEnabled(bool is_protection_enabled, u32 npad_id);
+ void SetAnalogStickUseCenterClamp(bool use_center_clamp);
void ClearAllConnectedControllers();
void DisconnectAllConnectedControllers();
void ConnectAllDisconnectedControllers();
@@ -577,6 +578,7 @@ private:
std::array<std::array<bool, 2>, 10> vibration_devices_mounted{};
std::array<ControllerHolder, 10> connected_controllers{};
std::array<bool, 10> unintended_home_button_input_protection{};
+ bool analog_stick_use_center_clamp{};
GyroscopeZeroDriftMode gyroscope_zero_drift_mode{GyroscopeZeroDriftMode::Standard};
bool sixaxis_sensors_enabled{true};
f32 sixaxis_fusion_parameter1{};