npad: Remove unused device handle parameter

This commit is contained in:
Morph 2021-01-27 13:05:07 -05:00
parent fb0fe3b8c3
commit d4d39aa4c7
3 changed files with 9 additions and 11 deletions

View File

@ -946,20 +946,19 @@ void Controller_NPad::SetSixAxisEnabled(bool six_axis_status) {
sixaxis_sensors_enabled = six_axis_status; sixaxis_sensors_enabled = six_axis_status;
} }
void Controller_NPad::SetSixAxisFusionParameters(const DeviceHandle& handle, f32 parameter1, void Controller_NPad::SetSixAxisFusionParameters(f32 parameter1, f32 parameter2) {
f32 parameter2) {
sixaxis_fusion_parameter1 = parameter1; sixaxis_fusion_parameter1 = parameter1;
sixaxis_fusion_parameter2 = parameter2; sixaxis_fusion_parameter2 = parameter2;
} }
std::pair<f32, f32> Controller_NPad::GetSixAxisFusionParameters(const DeviceHandle& handle) { std::pair<f32, f32> Controller_NPad::GetSixAxisFusionParameters() {
return { return {
sixaxis_fusion_parameter1, sixaxis_fusion_parameter1,
sixaxis_fusion_parameter2, sixaxis_fusion_parameter2,
}; };
} }
void Controller_NPad::ResetSixAxisFusionParameters(const DeviceHandle& handle) { void Controller_NPad::ResetSixAxisFusionParameters() {
sixaxis_fusion_parameter1 = 0.0f; sixaxis_fusion_parameter1 = 0.0f;
sixaxis_fusion_parameter2 = 0.0f; sixaxis_fusion_parameter2 = 0.0f;
} }

View File

@ -202,9 +202,9 @@ public:
GyroscopeZeroDriftMode GetGyroscopeZeroDriftMode() const; GyroscopeZeroDriftMode GetGyroscopeZeroDriftMode() const;
bool IsSixAxisSensorAtRest() const; bool IsSixAxisSensorAtRest() const;
void SetSixAxisEnabled(bool six_axis_status); void SetSixAxisEnabled(bool six_axis_status);
void SetSixAxisFusionParameters(const DeviceHandle& handle, f32 parameter1, f32 parameter2); void SetSixAxisFusionParameters(f32 parameter1, f32 parameter2);
std::pair<f32, f32> GetSixAxisFusionParameters(const DeviceHandle& handle); std::pair<f32, f32> GetSixAxisFusionParameters();
void ResetSixAxisFusionParameters(const DeviceHandle& handle); void ResetSixAxisFusionParameters();
LedPattern GetLedPattern(u32 npad_id); LedPattern GetLedPattern(u32 npad_id);
bool IsUnintendedHomeButtonInputProtectionEnabled(u32 npad_id) const; bool IsUnintendedHomeButtonInputProtectionEnabled(u32 npad_id) const;
void SetUnintendedHomeButtonInputProtectionEnabled(bool is_protection_enabled, u32 npad_id); void SetUnintendedHomeButtonInputProtectionEnabled(bool is_protection_enabled, u32 npad_id);

View File

@ -546,8 +546,7 @@ void Hid::SetSixAxisSensorFusionParameters(Kernel::HLERequestContext& ctx) {
const auto parameters{rp.PopRaw<Parameters>()}; const auto parameters{rp.PopRaw<Parameters>()};
applet_resource->GetController<Controller_NPad>(HidController::NPad) applet_resource->GetController<Controller_NPad>(HidController::NPad)
.SetSixAxisFusionParameters(parameters.sixaxis_handle, parameters.parameter1, .SetSixAxisFusionParameters(parameters.parameter1, parameters.parameter2);
parameters.parameter2);
LOG_WARNING(Service_HID, LOG_WARNING(Service_HID,
"(STUBBED) called, float1={}, float2={}, npad_type={}, npad_id={}, " "(STUBBED) called, float1={}, float2={}, npad_type={}, npad_id={}, "
@ -573,7 +572,7 @@ void Hid::GetSixAxisSensorFusionParameters(Kernel::HLERequestContext& ctx) {
std::tie(parameter1, parameter2) = std::tie(parameter1, parameter2) =
applet_resource->GetController<Controller_NPad>(HidController::NPad) applet_resource->GetController<Controller_NPad>(HidController::NPad)
.GetSixAxisFusionParameters(parameters.sixaxis_handle); .GetSixAxisFusionParameters();
LOG_WARNING(Service_HID, LOG_WARNING(Service_HID,
"(STUBBED) called, npad_type={}, npad_id={}, " "(STUBBED) called, npad_type={}, npad_id={}, "
@ -597,7 +596,7 @@ void Hid::ResetSixAxisSensorFusionParameters(Kernel::HLERequestContext& ctx) {
const auto parameters{rp.PopRaw<Parameters>()}; const auto parameters{rp.PopRaw<Parameters>()};
applet_resource->GetController<Controller_NPad>(HidController::NPad) applet_resource->GetController<Controller_NPad>(HidController::NPad)
.ResetSixAxisFusionParameters(parameters.sixaxis_handle); .ResetSixAxisFusionParameters();
LOG_WARNING(Service_HID, LOG_WARNING(Service_HID,
"(STUBBED) called, npad_type={}, npad_id={}, " "(STUBBED) called, npad_type={}, npad_id={}, "