diff options
author | german77 <juangerman-13@hotmail.com> | 2022-06-26 05:44:19 +0200 |
---|---|---|
committer | german77 <juangerman-13@hotmail.com> | 2022-06-27 03:21:37 +0200 |
commit | a7d9be13840acd65d0d684666390758ede72c826 (patch) | |
tree | 37485f63b09576444173d6a765abe0bb95dd45db /src/core/hle/service/hid/controllers/npad.cpp | |
parent | Merge pull request #8475 from liamwhite/x18 (diff) | |
download | yuzu-a7d9be13840acd65d0d684666390758ede72c826.tar yuzu-a7d9be13840acd65d0d684666390758ede72c826.tar.gz yuzu-a7d9be13840acd65d0d684666390758ede72c826.tar.bz2 yuzu-a7d9be13840acd65d0d684666390758ede72c826.tar.lz yuzu-a7d9be13840acd65d0d684666390758ede72c826.tar.xz yuzu-a7d9be13840acd65d0d684666390758ede72c826.tar.zst yuzu-a7d9be13840acd65d0d684666390758ede72c826.zip |
Diffstat (limited to 'src/core/hle/service/hid/controllers/npad.cpp')
-rw-r--r-- | src/core/hle/service/hid/controllers/npad.cpp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/src/core/hle/service/hid/controllers/npad.cpp b/src/core/hle/service/hid/controllers/npad.cpp index ac5c38cc6..c08b0a5dc 100644 --- a/src/core/hle/service/hid/controllers/npad.cpp +++ b/src/core/hle/service/hid/controllers/npad.cpp @@ -56,7 +56,7 @@ bool Controller_NPad::IsDeviceHandleValid(const Core::HID::VibrationDeviceHandle return npad_id && npad_type && device_index; } -ResultCode Controller_NPad::VerifyValidSixAxisSensorHandle( +Result Controller_NPad::VerifyValidSixAxisSensorHandle( const Core::HID::SixAxisSensorHandle& device_handle) { const auto npad_id = IsNpadIdValid(static_cast<Core::HID::NpadIdType>(device_handle.npad_id)); if (!npad_id) { @@ -720,9 +720,9 @@ Controller_NPad::NpadCommunicationMode Controller_NPad::GetNpadCommunicationMode return communication_mode; } -ResultCode Controller_NPad::SetNpadMode(Core::HID::NpadIdType npad_id, - NpadJoyDeviceType npad_device_type, - NpadJoyAssignmentMode assignment_mode) { +Result Controller_NPad::SetNpadMode(Core::HID::NpadIdType npad_id, + NpadJoyDeviceType npad_device_type, + NpadJoyAssignmentMode assignment_mode) { if (!IsNpadIdValid(npad_id)) { LOG_ERROR(Service_HID, "Invalid NpadIdType npad_id:{}", npad_id); return InvalidNpadId; @@ -984,7 +984,7 @@ void Controller_NPad::UpdateControllerAt(Core::HID::NpadStyleIndex type, InitNewlyAddedController(npad_id); } -ResultCode Controller_NPad::DisconnectNpad(Core::HID::NpadIdType npad_id) { +Result Controller_NPad::DisconnectNpad(Core::HID::NpadIdType npad_id) { if (!IsNpadIdValid(npad_id)) { LOG_ERROR(Service_HID, "Invalid NpadIdType npad_id:{}", npad_id); return InvalidNpadId; @@ -1032,7 +1032,7 @@ ResultCode Controller_NPad::DisconnectNpad(Core::HID::NpadIdType npad_id) { WriteEmptyEntry(shared_memory); return ResultSuccess; } -ResultCode Controller_NPad::SetGyroscopeZeroDriftMode( +Result Controller_NPad::SetGyroscopeZeroDriftMode( const Core::HID::SixAxisSensorHandle& sixaxis_handle, GyroscopeZeroDriftMode drift_mode) { const auto is_valid = VerifyValidSixAxisSensorHandle(sixaxis_handle); if (is_valid.IsError()) { @@ -1046,7 +1046,7 @@ ResultCode Controller_NPad::SetGyroscopeZeroDriftMode( return ResultSuccess; } -ResultCode Controller_NPad::GetGyroscopeZeroDriftMode( +Result Controller_NPad::GetGyroscopeZeroDriftMode( const Core::HID::SixAxisSensorHandle& sixaxis_handle, GyroscopeZeroDriftMode& drift_mode) const { const auto is_valid = VerifyValidSixAxisSensorHandle(sixaxis_handle); @@ -1061,8 +1061,8 @@ ResultCode Controller_NPad::GetGyroscopeZeroDriftMode( return ResultSuccess; } -ResultCode Controller_NPad::IsSixAxisSensorAtRest( - const Core::HID::SixAxisSensorHandle& sixaxis_handle, bool& is_at_rest) const { +Result Controller_NPad::IsSixAxisSensorAtRest(const Core::HID::SixAxisSensorHandle& sixaxis_handle, + bool& is_at_rest) const { const auto is_valid = VerifyValidSixAxisSensorHandle(sixaxis_handle); if (is_valid.IsError()) { LOG_ERROR(Service_HID, "Invalid handle, error_code={}", is_valid.raw); @@ -1074,7 +1074,7 @@ ResultCode Controller_NPad::IsSixAxisSensorAtRest( return ResultSuccess; } -ResultCode Controller_NPad::IsFirmwareUpdateAvailableForSixAxisSensor( +Result Controller_NPad::IsFirmwareUpdateAvailableForSixAxisSensor( const Core::HID::SixAxisSensorHandle& sixaxis_handle, bool& is_firmware_available) const { const auto is_valid = VerifyValidSixAxisSensorHandle(sixaxis_handle); if (is_valid.IsError()) { @@ -1087,7 +1087,7 @@ ResultCode Controller_NPad::IsFirmwareUpdateAvailableForSixAxisSensor( return ResultSuccess; } -ResultCode Controller_NPad::EnableSixAxisSensorUnalteredPassthrough( +Result Controller_NPad::EnableSixAxisSensorUnalteredPassthrough( const Core::HID::SixAxisSensorHandle& sixaxis_handle, bool is_enabled) { const auto is_valid = VerifyValidSixAxisSensorHandle(sixaxis_handle); if (is_valid.IsError()) { @@ -1100,7 +1100,7 @@ ResultCode Controller_NPad::EnableSixAxisSensorUnalteredPassthrough( return ResultSuccess; } -ResultCode Controller_NPad::IsSixAxisSensorUnalteredPassthroughEnabled( +Result Controller_NPad::IsSixAxisSensorUnalteredPassthroughEnabled( const Core::HID::SixAxisSensorHandle& sixaxis_handle, bool& is_enabled) const { const auto is_valid = VerifyValidSixAxisSensorHandle(sixaxis_handle); if (is_valid.IsError()) { @@ -1113,7 +1113,7 @@ ResultCode Controller_NPad::IsSixAxisSensorUnalteredPassthroughEnabled( return ResultSuccess; } -ResultCode Controller_NPad::LoadSixAxisSensorCalibrationParameter( +Result Controller_NPad::LoadSixAxisSensorCalibrationParameter( const Core::HID::SixAxisSensorHandle& sixaxis_handle, Core::HID::SixAxisSensorCalibrationParameter& calibration) const { const auto is_valid = VerifyValidSixAxisSensorHandle(sixaxis_handle); @@ -1128,7 +1128,7 @@ ResultCode Controller_NPad::LoadSixAxisSensorCalibrationParameter( return ResultSuccess; } -ResultCode Controller_NPad::GetSixAxisSensorIcInformation( +Result Controller_NPad::GetSixAxisSensorIcInformation( const Core::HID::SixAxisSensorHandle& sixaxis_handle, Core::HID::SixAxisSensorIcInformation& ic_information) const { const auto is_valid = VerifyValidSixAxisSensorHandle(sixaxis_handle); @@ -1143,7 +1143,7 @@ ResultCode Controller_NPad::GetSixAxisSensorIcInformation( return ResultSuccess; } -ResultCode Controller_NPad::ResetIsSixAxisSensorDeviceNewlyAssigned( +Result Controller_NPad::ResetIsSixAxisSensorDeviceNewlyAssigned( const Core::HID::SixAxisSensorHandle& sixaxis_handle) { const auto is_valid = VerifyValidSixAxisSensorHandle(sixaxis_handle); if (is_valid.IsError()) { @@ -1157,8 +1157,8 @@ ResultCode Controller_NPad::ResetIsSixAxisSensorDeviceNewlyAssigned( return ResultSuccess; } -ResultCode Controller_NPad::SetSixAxisEnabled(const Core::HID::SixAxisSensorHandle& sixaxis_handle, - bool sixaxis_status) { +Result Controller_NPad::SetSixAxisEnabled(const Core::HID::SixAxisSensorHandle& sixaxis_handle, + bool sixaxis_status) { const auto is_valid = VerifyValidSixAxisSensorHandle(sixaxis_handle); if (is_valid.IsError()) { LOG_ERROR(Service_HID, "Invalid handle, error_code={}", is_valid.raw); @@ -1170,7 +1170,7 @@ ResultCode Controller_NPad::SetSixAxisEnabled(const Core::HID::SixAxisSensorHand return ResultSuccess; } -ResultCode Controller_NPad::IsSixAxisSensorFusionEnabled( +Result Controller_NPad::IsSixAxisSensorFusionEnabled( const Core::HID::SixAxisSensorHandle& sixaxis_handle, bool& is_fusion_enabled) const { const auto is_valid = VerifyValidSixAxisSensorHandle(sixaxis_handle); if (is_valid.IsError()) { @@ -1183,7 +1183,7 @@ ResultCode Controller_NPad::IsSixAxisSensorFusionEnabled( return ResultSuccess; } -ResultCode Controller_NPad::SetSixAxisFusionEnabled( +Result Controller_NPad::SetSixAxisFusionEnabled( const Core::HID::SixAxisSensorHandle& sixaxis_handle, bool is_fusion_enabled) { const auto is_valid = VerifyValidSixAxisSensorHandle(sixaxis_handle); if (is_valid.IsError()) { @@ -1197,7 +1197,7 @@ ResultCode Controller_NPad::SetSixAxisFusionEnabled( return ResultSuccess; } -ResultCode Controller_NPad::SetSixAxisFusionParameters( +Result Controller_NPad::SetSixAxisFusionParameters( const Core::HID::SixAxisSensorHandle& sixaxis_handle, Core::HID::SixAxisSensorFusionParameters sixaxis_fusion_parameters) { const auto is_valid = VerifyValidSixAxisSensorHandle(sixaxis_handle); @@ -1217,7 +1217,7 @@ ResultCode Controller_NPad::SetSixAxisFusionParameters( return ResultSuccess; } -ResultCode Controller_NPad::GetSixAxisFusionParameters( +Result Controller_NPad::GetSixAxisFusionParameters( const Core::HID::SixAxisSensorHandle& sixaxis_handle, Core::HID::SixAxisSensorFusionParameters& parameters) const { const auto is_valid = VerifyValidSixAxisSensorHandle(sixaxis_handle); @@ -1232,8 +1232,8 @@ ResultCode Controller_NPad::GetSixAxisFusionParameters( return ResultSuccess; } -ResultCode Controller_NPad::MergeSingleJoyAsDualJoy(Core::HID::NpadIdType npad_id_1, - Core::HID::NpadIdType npad_id_2) { +Result Controller_NPad::MergeSingleJoyAsDualJoy(Core::HID::NpadIdType npad_id_1, + Core::HID::NpadIdType npad_id_2) { if (!IsNpadIdValid(npad_id_1) || !IsNpadIdValid(npad_id_2)) { LOG_ERROR(Service_HID, "Invalid NpadIdType npad_id_1:{}, npad_id_2:{}", npad_id_1, npad_id_2); @@ -1304,8 +1304,8 @@ void Controller_NPad::StopLRAssignmentMode() { is_in_lr_assignment_mode = false; } -ResultCode Controller_NPad::SwapNpadAssignment(Core::HID::NpadIdType npad_id_1, - Core::HID::NpadIdType npad_id_2) { +Result Controller_NPad::SwapNpadAssignment(Core::HID::NpadIdType npad_id_1, + Core::HID::NpadIdType npad_id_2) { if (!IsNpadIdValid(npad_id_1) || !IsNpadIdValid(npad_id_2)) { LOG_ERROR(Service_HID, "Invalid NpadIdType npad_id_1:{}, npad_id_2:{}", npad_id_1, npad_id_2); @@ -1336,8 +1336,8 @@ ResultCode Controller_NPad::SwapNpadAssignment(Core::HID::NpadIdType npad_id_1, return ResultSuccess; } -ResultCode Controller_NPad::GetLedPattern(Core::HID::NpadIdType npad_id, - Core::HID::LedPattern& pattern) const { +Result Controller_NPad::GetLedPattern(Core::HID::NpadIdType npad_id, + Core::HID::LedPattern& pattern) const { if (!IsNpadIdValid(npad_id)) { LOG_ERROR(Service_HID, "Invalid NpadIdType npad_id:{}", npad_id); return InvalidNpadId; @@ -1347,8 +1347,8 @@ ResultCode Controller_NPad::GetLedPattern(Core::HID::NpadIdType npad_id, return ResultSuccess; } -ResultCode Controller_NPad::IsUnintendedHomeButtonInputProtectionEnabled( - Core::HID::NpadIdType npad_id, bool& is_valid) const { +Result Controller_NPad::IsUnintendedHomeButtonInputProtectionEnabled(Core::HID::NpadIdType npad_id, + bool& is_valid) const { if (!IsNpadIdValid(npad_id)) { LOG_ERROR(Service_HID, "Invalid NpadIdType npad_id:{}", npad_id); return InvalidNpadId; @@ -1358,7 +1358,7 @@ ResultCode Controller_NPad::IsUnintendedHomeButtonInputProtectionEnabled( return ResultSuccess; } -ResultCode Controller_NPad::SetUnintendedHomeButtonInputProtectionEnabled( +Result Controller_NPad::SetUnintendedHomeButtonInputProtectionEnabled( bool is_protection_enabled, Core::HID::NpadIdType npad_id) { if (!IsNpadIdValid(npad_id)) { LOG_ERROR(Service_HID, "Invalid NpadIdType npad_id:{}", npad_id); |